Open RyanThomas73 opened 6 months ago
This is called out in the original post, but maybe not explicitly clear.
Webjobs tracing, such as request and dependency tracing, is dependent on using the application insights logger.
Outside of OpenTelemetry, this also impacts scenarios where an alternate logger provider is used, such as Serilog. This feels quite unintuitive since it seems like switching the LoggerProvider should only affect logs, but it seems like all telemetry is tied into the application insights logger provider.
Currently the webjobs sdk only appears to support distributed tracing when explicitly using the webjob application insights logger.
Using the open telemetry SDKs, including the AzureMonitor exporter which writes to application insights, result in no diagnostic activity being started for the function execution and the corresponding context links to the upstream services are unavailable in application insights.
Feature Request
Support distributed tracing activities using the open telemetry compatible
ActivitySource
andActivity
in usage scenarios beyond just the webjob specific application insights logger implementation.Related information
Package Versions:
Microsoft.Azure.WebJobs
v3.0.39
Microsoft.Azure.WebJobs.Logging.ApplicationInsights
v3.0.35
Links To Source: The webjob function executor where the function invocation scope is created The app insights logger where the function invocation scope triggers the creation and links to the distributed tracing activity
Related Issues
2824
1731
Additional Doc References https://learn.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs#activitysource https://opentelemetry.io/docs/languages/net/instrumentation/