-
Notifications
You must be signed in to change notification settings - Fork 825
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
docs(sdk-metrics): add example of exponential histogram metric #3855
docs(sdk-metrics): add example of exponential histogram metric #3855
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3855 +/- ##
=======================================
Coverage 92.32% 92.32%
=======================================
Files 321 321
Lines 9167 9167
Branches 1945 1945
=======================================
Hits 8463 8463
Misses 704 704 |
8ba4dfe
to
fefedbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth documenting that you can also achieve this for all histograms by setting this field on the metric reader:
aggregationSelector?: AggregationSelector; |
There is also an environment variable for this OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION
but it doesn't look like it has been implemented yet (opened #3920)
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Sorry all, I totally did a drive-by on this and forgot to come back to it. I committed the suggested change (forgot I changed that before pushing 😅 thank you). |
Sorry for the slowness on this one! If this is good enough maybe we merge it in as-is and follow up with a better example/docs (along with the new env var implementation). I admittedly don't have a ton of experience with histograms 😅 so that is definitely adding to the bare bones of the example; was just hoping to get a little something in an example app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this to the example 🙂
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks 🙂
Which problem is this PR solving?
Fixes #3852
Short description of the changes
ConsoleMetricExporter
for quick dev testingI didn't update the
metrics.md
with the specific example because that didn't seem to have all the specific examples; I will look to update the public website next though (opentelemetry.io
)Type of change
How Has This Been Tested?
ConsoleMetricExporter
(comment out or don't use theOTLPMetricExporter
) and see the example metric in the console. Run with debug to see all the extra datapointsChecklist: