-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default Listening model for ActivitySource #736
Comments
I like the idea of using filtering akin to ILogger. A simple |
Added this as required-for-ga. This is a critical portion of OTel enablement experience, so need to ensure this is correctly handled before GA. |
The general consensus from several SIG meeting was that, its best to opt-in to each ActivitySources of interest, rather than subscribing to all by default. This will be made clear in the instrumentation doc as well. |
@cijothomas sorry to comment on this issue, but does the AddSource() call support wildcards? I tried adding a source as "Zocdoc." but that didn't seem to capture a source of "Zocdoc.Http". |
"Zocdoc.*" should cover it |
Oh sorry I missed the example entirely. Thanks for the help! |
The current SDK behavior is to listen to only those ActivitySources which are explicitly configured by the user.
https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/src/OpenTelemetry/Trace/Configuration/OpenTelemetrySdk.cs#L89
Adding a ActivitySource is done using builder.AddActivitySource()
https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/src/OpenTelemetry/Trace/Configuration/OpenTelemetryBuilder.cs#L74
Opening this issue here to gather feedback on this approach. Alternate approach is to listen to every ActivitySource in the process, except those explicitly disabled. This may be too much noise, but can be controlled by selectively disabling.
(We can also explore if we want to do filtering similar to Ilogger (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.2#log-filtering). Something like "collect all activities from sources starting with "System.Data.Sql" etc.)
The immediate goal is to seek opinion on the current model - nothing is listened by default. Users must add ActivitySources they are interested in.
The text was updated successfully, but these errors were encountered: