Modify metric example to use console exporter defaults (#3143)
This commit is contained in:
parent
950c6162b4
commit
4e2437cfcd
|
|
@ -90,10 +90,6 @@ namespace Examples.AspNet
|
|||
meterBuilder.AddConsoleExporter((exporterOptions, metricReaderOptions) =>
|
||||
{
|
||||
exporterOptions.Targets = ConsoleExporterOutputTargets.Debug;
|
||||
|
||||
// The ConsoleMetricExporter defaults to a manual collect cycle.
|
||||
// This configuration causes metrics to be exported to stdout on a 10s interval.
|
||||
metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds = 10000;
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,12 +131,7 @@ builder.Services.AddOpenTelemetryMetrics(options =>
|
|||
});
|
||||
break;
|
||||
default:
|
||||
options.AddConsoleExporter((exporterOptions, metricReaderOptions) =>
|
||||
{
|
||||
// The ConsoleMetricExporter defaults to a manual collect cycle.
|
||||
// This configuration causes metrics to be exported to stdout on a 10s interval.
|
||||
metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds = 10000;
|
||||
});
|
||||
options.AddConsoleExporter();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue