-
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
Clean up metric reader options #3038
Clean up metric reader options #3038
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3038 +/- ##
==========================================
+ Coverage 84.74% 84.91% +0.16%
==========================================
Files 258 259 +1
Lines 9105 9112 +7
==========================================
+ Hits 7716 7737 +21
+ Misses 1389 1375 -14
|
@@ -25,6 +26,9 @@ namespace OpenTelemetry.Metrics | |||
/// </summary> | |||
public static class ConsoleExporterMetricsExtensions | |||
{ | |||
private const int DefaultExportIntervalMilliseconds = Timeout.Infinite; | |||
private const int DefaultExportTimeoutMilliseconds = 30000; |
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.
Do we need timeout 30000 or Infinite?
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.
I just submitted open-telemetry/opentelemetry-specification#2415 for further clarification.
I'll set to Infinite for now and change depending on how things shake out.
@@ -26,6 +27,9 @@ namespace OpenTelemetry.Metrics | |||
/// </summary> | |||
public static class InMemoryExporterMetricsExtensions | |||
{ | |||
private const int DefaultExportIntervalMilliseconds = Timeout.Infinite; | |||
private const int DefaultExportTimeoutMilliseconds = 30000; |
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.
Do we need timeout 30000 or Infinite?
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 except the same qn as Reiley about default for ExportTimeout to be infinite vs 30
We could get rid of the default exportInterval and timeout in |
It is still possible to instantiate the var metricExporter = new ConsoleExporter();
var metricReader = new PeriodicExportingMetricReader(exporter);
var meterProviderBuilder = Sdk.CreateMeterProviderBuilder().AddReader(metricReader); |
MetricReaderType
enumeration.PeriodicExportingMetricReaderOptions.ExportTimeoutMilliseconds
with a default of30000
for all push exporters.MetricReaderOptions.PeriodicExportingMetricReaderOptions
is no longer settable.