-
Notifications
You must be signed in to change notification settings - Fork 775
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
Fix metric export interval to match spec #2641
Fix metric export interval to match spec #2641
Conversation
|
/// </summary> | ||
public int MetricExportIntervalMilliseconds { get; set; } = Timeout.Infinite; | ||
public int MetricExportIntervalMilliseconds { get; set; } = 60000; |
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.
Why would a console exporter use the periodic exporting strategy by default?
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.
Ah, yes that makes sense now. The side-effect of this change causing the console exporter to default to periodic exporting was not immediately obvious.
opentelemetry-dotnet/src/OpenTelemetry.Exporter.Console/ConsoleExporterMetricsExtensions.cs
Lines 42 to 44 in 6e6afdb
var reader = options.MetricExportIntervalMilliseconds == Timeout.Infinite | |
? new BaseExportingMetricReader(exporter) | |
: new PeriodicExportingMetricReader(exporter, options.MetricExportIntervalMilliseconds); |
My gut says it would make sense to decouple the idea of periodic vs. non-periodic in a separate config setting. Kinda similar to how tracing has the batch exporter options.
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.
Maybe break this into two PRs... because I think the change to the OTLP exporter is correct.
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.
Ok. I broke it up.
Codecov Report
@@ Coverage Diff @@
## main #2641 +/- ##
==========================================
- Coverage 80.97% 80.92% -0.05%
==========================================
Files 243 243
Lines 8547 8547
==========================================
- Hits 6921 6917 -4
- Misses 1626 1630 +4
|
50fc91c
to
74c02cb
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.
LGTM.
@svetlanabrennan Could you update the description as it is outdated now? The linked issue require separate handling, so that may be removed. |
The spec says export interval should be 60000 milliseconds and this pr fixes this for the otlp metric exporter.
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes