Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add meaningful .toString to NoopLogRecordProcessor and DefaultOpenTelemetry #5493

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented May 31, 2023

A small improvement. The behavior is similar to

@Override
public String toString() {
return "NoopTextMapPropagator";
}

@iRevive iRevive requested a review from a team May 31, 2023 07:02
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (83f9144) 91.33% compared to head (7b68022) 91.34%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5493   +/-   ##
=========================================
  Coverage     91.33%   91.34%           
- Complexity     4891     4893    +2     
=========================================
  Files           547      547           
  Lines         14410    14412    +2     
  Branches       1354     1354           
=========================================
+ Hits          13161    13164    +3     
  Misses          865      865           
+ Partials        384      383    -1     
Impacted Files Coverage Δ
...ava/io/opentelemetry/api/DefaultOpenTelemetry.java 100.00% <100.00%> (ø)
...opentelemetry/sdk/logs/NoopLogRecordProcessor.java 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@iRevive iRevive changed the title Add meaningful .toString to NoopLogRecordProcessor Add meaningful .toString to NoopLogRecordProcessor and DefaultOpenTelemetry May 31, 2023

@Override
public String toString() {
return "DefaultOpenTelemetry{"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still trying to figure out how that is correct. TracerProvider and MeterProvider are always noop. Should I include them in toString?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say no. This looks fine to me.

@iRevive iRevive force-pushed the meaningful-tostring branch 2 times, most recently from 52cdc45 to 56de53a Compare May 31, 2023 13:42
@jkwatson jkwatson merged commit 0ab6915 into open-telemetry:main Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants