-
Notifications
You must be signed in to change notification settings - Fork 772
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
Support OTEL_METRIC_EXPORT_INTERVAL and OTEL_METRIC_EXPORT_TIMEOUT #3424
Support OTEL_METRIC_EXPORT_INTERVAL and OTEL_METRIC_EXPORT_TIMEOUT #3424
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3424 +/- ##
==========================================
+ Coverage 86.20% 86.30% +0.10%
==========================================
Files 263 263
Lines 9545 9550 +5
==========================================
+ Hits 8228 8242 +14
+ Misses 1317 1308 -9
|
Side note: These failures are awkward: https://github.com/open-telemetry/opentelemetry-dotnet/runs/7217170744?check_suite_focus=true Did anyone encounter the same problem? Looks like some strange side-effect - I have not analyzed it. |
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.
Looks good to me :) Just left one small question about the readme changes.
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.
LGTM.
The environment variables are still marked as Experimental |
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.
Did not realize that https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#periodic-exporting-metricreader was still experimental! Will 1st check if Metrics Spec is close to marking this stable, and based on that device a plan for support in the SDK. |
@cijothomas @reyang
EDIT: I decided to create open-telemetry/opentelemetry-specification#2658 |
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.
LGTM.
Fixes #3417.
Changes
The
MetricReaderOptions
defaults can be overridden usingOTEL_METRIC_EXPORT_INTERVAL
andOTEL_METRIC_EXPORT_TIMEOUT
environmental variables as defined in the
specification.
This change applies to all metrics exporters that use
PeriodicExportingMetricReaderHelper.CreatePeriodicExportingMetricReader
I think it is not possible to implement it for all instances of
PeriodicExportingMetricReader
without changing and breaking its public API (assuming that the value in "options" has precedence over the environmental variable which is the currently followed pattern).For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changesDesign discussion issue #CreatePeriodicExportingMetricReader
that match the OTel spec