Skip to content

Commit

Permalink
make gauge reader run more frequently
Browse files Browse the repository at this point in the history
  • Loading branch information
hkfgo committed Nov 1, 2024
1 parent 0781565 commit 27ac16a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ private static void AddOpenTelemetryCollectorMetricSink(string collectorUri, str
{
metricsBuilder.SetResourceBuilder(resourceBuilder)
.AddMeter("Promitor.Scraper.Metrics.AzureMonitor")
.AddOtlpExporter(options => options.Endpoint = new Uri(collectorUri));
.AddOtlpExporter((exporterOptions, metricReaderOptions) =>
{
exporterOptions.Endpoint = new Uri(collectorUri);
metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds = 15000;
});
});
services.AddTransient<IMetricSink, OpenTelemetryCollectorMetricSink>();
services.AddTransient<OpenTelemetryCollectorMetricSink>();
Expand Down

0 comments on commit 27ac16a

Please sign in to comment.