Does opentelemetry-dotnet-instrumentation support .AddSource("*")
#4351
-
Is it possible to do, I'm thinking of doing like below: services.AddOpenTelemetry()
.ConfigureResource(resource => { resource.AddService("MYAPP"); })
.WithTracing(tracing => tracing
.SetSampler(new AlwaysOnSampler())
.AddSource("*") // <--- Relevant Snippet
.AddRedisInstrumentation()
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddEntityFrameworkCoreInstrumentation()
.AddSqlClientInstrumentation()
.AddOtlpExporter(c => c.Endpoint = configuration.Otel.Uri))
.WithMetrics(metrics => metrics
.AddMeter("*") // <--- Relevant Snippet
.AddRuntimeInstrumentation()
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation()
.AddSqlClientInstrumentation()
.AddOtlpExporter(c => c.Endpoint = configuration.Otel.Uri)); Is this supported? |
Beta Was this translation helpful? Give feedback.
Answered by
zacharycmontoya
Jul 30, 2025
Replies: 1 comment
-
Hi @bangonkali, the auto-instrumentation package provides the following environment variables that would implement the same functionality as if you were configuring the SDK this way, which handles the
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bangonkali
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @bangonkali, the auto-instrumentation package provides the following environment variables that would implement the same functionality as if you were configuring the SDK this way, which handles the
"*"
input:OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES
(opentelemetry-dotnet-instrumentation/docs/config.md
Line 417 in 802963f
…