Update OpenTelemetry.cs
This commit is contained in:
@@ -38,13 +38,13 @@ public static class OpenTelemetry
|
|||||||
// Metrics provided by System.Net libraries
|
// Metrics provided by System.Net libraries
|
||||||
.AddMeter("System.Net.Http")
|
.AddMeter("System.Net.Http")
|
||||||
.AddMeter("System.Net.NameResolution")
|
.AddMeter("System.Net.NameResolution")
|
||||||
.AddMeter("MongoDB.Driver.Core.Extensions.DiagnosticSources")
|
|
||||||
.AddPrometheusExporter());
|
.AddPrometheusExporter());
|
||||||
|
|
||||||
// Add Tracing for ASP.NET Core and our custom ActivitySource and export to Jaeger
|
// Add Tracing for ASP.NET Core and our custom ActivitySource and export to Jaeger
|
||||||
var tracingOtlpEndpoint = configuration["OTLP_ENDPOINT_URL"];
|
var tracingOtlpEndpoint = configuration["OTLP_ENDPOINT_URL"];
|
||||||
otel.WithTracing(tracing =>
|
otel.WithTracing(tracing =>
|
||||||
{
|
{
|
||||||
|
tracing.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources");
|
||||||
tracing.AddAspNetCoreInstrumentation();
|
tracing.AddAspNetCoreInstrumentation();
|
||||||
tracing.AddHttpClientInstrumentation();
|
tracing.AddHttpClientInstrumentation();
|
||||||
if (!string.IsNullOrWhiteSpace(tracingOtlpEndpoint))
|
if (!string.IsNullOrWhiteSpace(tracingOtlpEndpoint))
|
||||||
|
|||||||
Reference in New Issue
Block a user