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) =>
|
meterBuilder.AddConsoleExporter((exporterOptions, metricReaderOptions) =>
|
||||||
{
|
{
|
||||||
exporterOptions.Targets = ConsoleExporterOutputTargets.Debug;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,12 +131,7 @@ builder.Services.AddOpenTelemetryMetrics(options =>
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
options.AddConsoleExporter((exporterOptions, metricReaderOptions) =>
|
options.AddConsoleExporter();
|
||||||
{
|
|
||||||
// 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;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue