-
Notifications
You must be signed in to change notification settings - Fork 38
[Feature Request] OpenTelemetry
tracing integration
#666
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
Comments
Hi, @julealgon. Thanks for reaching out! Good to hear from you again! App Config is going to have its .NET Aspire component: PR. .NET Aspire components all need to support OTEL tracing PR
So, I personally don’t think providing the OTEL package should be a high priority. But I am not saying we will never provide a package for OTEL since OTEL is the trending and Microsoft is embracing it. For those who are not using .NET Aspire, as long as they know the activity source, the below code snippet for OTEL is not very complex for them to configure tracing for App Config. builder.Services.AddOpenTelemetry()
.WithTracing(traceBuilder =>
traceBuilder.AddSource(["Microsoft.Extensions.Configuration.AzureAppConfiguration"])); |
@zhiyuanliang-ms thanks for getting back on this. Adding the source works fine indeed, but just keep in mind that existing instrumentations also tend to add a custom The "official" package would likely have that in addition to the |
Hi, @julealgon
This is interesting. So this targets on the scenario of "tap into existing instrumentation". For my education, could you give me some examples?
Is there any existing examples to reference? |
@zhiyuanliang-ms I believe the closest example to what the AppConfig OTEL instrumentation would look like is the HTTP Client one, since that one also fully redirects to the built-in instrumentation starting with .NET7: Here you can see how it adds both the source(s), as well as the instrumentation object that I mentioned. The http version of that class doesn't implement any specific interface and in that case only has private members. You may want to double check why the OTEL team tends to add those, but I believe the main purpose is so that the OTEL SDK can output metadata about which instrumentations are present, including their versions, which it captures from the assembly version of the type you provide: It is interesting though the the Runtime metric instrumentation, another one which basically delegates to native instrumentation on later versions, doesn't seem to register that "instrumentation" object when it taps into the native one as evidenced by this: So perhaps the instrumentation object should really only be added when the logic actually contains custom instrumentations, and not when it just redirects to native instrumentation? It is a bit confusing to me that these 2 examples appear to clash with each other. I assume someone from the OTEL team could clarify the distinction. |
I noticed in the latest release notes for 8.2.0:
That new Activities are now created for some of the actions performed by this package, with an activity source named
Microsoft.Extensions.Configuration.AzureAppConfiguration
.With this in mind, could the team also provide an official instrumentation package for OpenTelemetry that listens on that activity source?
Usually, all traces and metrics are exposed to OTEL via one of those
OpenTelemetry.Instrumentation.*
packages, that either instrument the code themselves, or just tap into existing instrumentation (which I assume would be the case here).In the meantime, my assumption is that we just need to call
AddSource("Microsoft.Extensions.Configuration.AzureAppConfiguration")
on theTracerProviderBuilder
for the newly introduced activities to be propagated in a simplistic manner?The text was updated successfully, but these errors were encountered: