Modify example asp.net core app to config prometheus options (#2988)
This commit is contained in:
parent
0a84e11272
commit
97f21802a3
|
|
@ -147,6 +147,8 @@ namespace Examples.AspNetCore
|
|||
break;
|
||||
}
|
||||
});
|
||||
|
||||
services.Configure<PrometheusExporterOptions>(this.Configuration.GetSection("Prometheus"));
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
"Endpoint": "http://localhost:14268",
|
||||
"Protocol": "UdpCompactThrift"
|
||||
},
|
||||
"Prometheus": {
|
||||
"ScrapeResponseCacheDurationMilliseconds": 5000
|
||||
},
|
||||
"Zipkin": {
|
||||
"ServiceName": "zipkin-test",
|
||||
"Endpoint": "http://localhost:9411/api/v2/spans"
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace OpenTelemetry.Exporter.Prometheus
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start exporter.
|
||||
/// Start Http Server.
|
||||
/// </summary>
|
||||
/// <param name="token">An optional <see cref="CancellationToken"/> that can be used to stop the HTTP server.</param>
|
||||
public void Start(CancellationToken token = default)
|
||||
|
|
|
|||
Loading…
Reference in New Issue