You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading an http triggered in-proc function to net8, the host runtime is now creating a new Activity without a Source Name. This is a change in behaviour that breaks telemetry. This changes otel by adding a new parent activity. Additionally the activity cannot be subscribe to due to not having a source name. When exporting otel, this looks like an empty root span.
Add a breakpoint after function dispatch, add watch on Activty.Current => should be null
Repeat above steps with net8. Should see something similar to the below
Expected Behaviour
Expected behaviour is not having the host create a current activity. If host is required to create activities then a source name is required to be able to subscribe to it. This results in missing spans in our otel telemetry after export.
Known workarounds
We've temporarily patched this by setting Activty.Current to null before starting a root activity.
The text was updated successfully, but these errors were encountered:
@JessicaA-Auror I don't think this is functions specific. I believe this is a BCL change between .net6 and .net8. You are specifically seeing an operation from AspNetCore. Have you tried using OTels AspNetCore instrumentation package? I believe they do some work to shim this: https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
If you are not the original author (JessicaA-Auror) and believe this issue is not stale, please comment with /bot not-stale and I will not close it.
When upgrading an http triggered in-proc function to net8, the host runtime is now creating a new
Activity
without aSource Name
. This is a change in behaviour that breaks telemetry. This changes otel by adding a new parent activity. Additionally the activity cannot be subscribe to due to not having a source name. When exporting otel, this looks like an empty root span.A similar issue looks to have be recently fixed in isolated function see here: Azure/azure-functions-dotnet-worker#2733
Repro steps
Create a new HTTP Trigger function (in-proc) running on net6
Add OpenTelemetry configuration
Add a breakpoint after function dispatch, add watch on
Activty.Current
=> should be nullRepeat above steps with net8. Should see something similar to the below
Expected Behaviour
Expected behaviour is not having the host create a current activity. If host is required to create activities then a source name is required to be able to subscribe to it. This results in missing spans in our otel telemetry after export.
Known workarounds
We've temporarily patched this by setting
Activty.Current
to null before starting a root activity.The text was updated successfully, but these errors were encountered: