-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat(metrics-exporters): configure temporality via env var #3305
feat(metrics-exporters): configure temporality via env var #3305
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3305 +/- ##
==========================================
+ Coverage 93.46% 93.84% +0.37%
==========================================
Files 244 222 -22
Lines 7325 6526 -799
Branches 1515 1351 -164
==========================================
- Hits 6846 6124 -722
+ Misses 479 402 -77
|
Thanks for working on this. I think we should add some documentation in the readme around using these environment variables similar to this. I know the spec mentions all these details but I think it's helpful for new otel users to see some quick documentation around these env variable options when using these exporters. Maybe this documentation work can be done in a separate PR since I know we have an issue open to document latest metrics SDK. |
I added the env var to the docs and adapted the table for use in the metrics exporters. It bloats up the diff a bit but I think it fits within the scope of this PR. 🙂 However, I also found that several environment variables that were listed in the GRPC metrics exporter's readme are not respected. I have kept those in for now. |
experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/README.md
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/OTLPMetricExporter.ts
Show resolved
Hide resolved
Failing build will be fixed by #3328 🙂 |
.../packages/opentelemetry-exporter-metrics-otlp-http/test/node/CollectorMetricExporter.test.ts
Outdated
Show resolved
Hide resolved
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 working on this!
@pichlermarc I can not update this PR's branch so please update it with the latest main branch and feel free to merge this PR! :D |
Which problem is this PR solving?
Previously, the aggregation temporality could only be changed by explicitly setting it in the exporters constructor. This PR changes this by implementing the spec around the
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
variable.Setting this variable will allow users to configure temporality preference. Invalid values will default to
cumulative
and will be logged as a warning.Related to (but does not close) #3193
Type of change
How Has This Been Tested?
Checklist: