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 toString method to AbstractInstrument #4883

Conversation

mkorzeniewski
Copy link
Contributor

@mkorzeniewski mkorzeniewski commented Oct 24, 2022

Partially resolves: #4829

I have added a toString method to the abstract class to make it available for every implementation of the AbstractInstrument. I believe the better way would be adding toString method to each the subclasses, but I would appreciate a piece of advice here.

Sample toString for the SdkDoubleHistogram is:

SdkDoubleHistogram{descriptor=InstrumentDescriptor{name=testHistogram, description=, unit=, type=HISTOGRAM, valueType=DOUBLE}}

@mkorzeniewski mkorzeniewski requested a review from a team October 24, 2022 20:38
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 24, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mkorzeniewski / name: Michal Korzeniewski (666aaf3)

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

seems fine to me

@mkorzeniewski mkorzeniewski force-pushed the issue-4829-add-tostring-to-classes-from-metrics-package branch from 666aaf3 to 05cac6e Compare October 25, 2022 05:56
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 25, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mkorzeniewski / name: Michal Korzeniewski (6591edd)

@mkorzeniewski mkorzeniewski force-pushed the issue-4829-add-tostring-to-classes-from-metrics-package branch from 05cac6e to 6591edd Compare October 25, 2022 05:57
@mkorzeniewski
Copy link
Contributor Author

force push to the branch with author e-mail change

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Base: 90.79% // Head: 90.83% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (ffdf04e) compared to base (d1a17d7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4883      +/-   ##
============================================
+ Coverage     90.79%   90.83%   +0.04%     
- Complexity     4844     4857      +13     
============================================
  Files           555      556       +1     
  Lines         14438    14475      +37     
  Branches       1405     1410       +5     
============================================
+ Hits          13109    13149      +40     
+ Misses          910      908       -2     
+ Partials        419      418       -1     
Impacted Files Coverage Δ
.../opentelemetry/sdk/metrics/AbstractInstrument.java 41.66% <100.00%> (+5.30%) ⬆️
...metry/sdk/autoconfigure/ResourceConfiguration.java 94.87% <0.00%> (-5.13%) ⬇️
.../api/baggage/propagation/W3CBaggagePropagator.java 81.63% <0.00%> (ø)
...porter/otlp/trace/OtlpGrpcSpanExporterBuilder.java 100.00% <0.00%> (ø)
...er/otlp/metrics/OtlpGrpcMetricExporterBuilder.java 100.00% <0.00%> (ø)
...r/otlp/http/trace/OtlpHttpSpanExporterBuilder.java 100.00% <0.00%> (ø)
...er/otlp/logs/OtlpGrpcLogRecordExporterBuilder.java 100.00% <0.00%> (ø)
...lp/http/metrics/OtlpHttpMetricExporterBuilder.java 100.00% <0.00%> (ø)
...lp/http/logs/OtlpHttpLogRecordExporterBuilder.java 100.00% <0.00%> (ø)
...emetry/api/baggage/propagation/PercentEscaper.java
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@jack-berg jack-berg merged commit 5ac1cef into open-telemetry:main Oct 25, 2022
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.

api metrics missing toString/get implementation
3 participants