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. |
joaopgrassi
left a comment
There was a problem hiding this comment.
Looks good to me :) Just left one small question about the readme changes.
|
The environment variables are still marked as Experimental |
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 |
Fixes #3417.
Changes
The
MetricReaderOptionsdefaults can be overridden usingOTEL_METRIC_EXPORT_INTERVALandOTEL_METRIC_EXPORT_TIMEOUTenvironmental variables as defined in the
specification.
This change applies to all metrics exporters that use
PeriodicExportingMetricReaderHelper.CreatePeriodicExportingMetricReaderI think it is not possible to implement it for all instances of
PeriodicExportingMetricReaderwithout 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.mdupdated for non-trivial changesDesign discussion issue #CreatePeriodicExportingMetricReaderthat match the OTel spec