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
Background
In case of custom propagation a new activity is created with the context extracted from the propagator. Starting .NET7.0 we use the ActivitySource on the activity created by ASP.NET Core to create and start this new activity. The activity is then later identified and stopped by checking the first tag.
Issue
As the activity is created using ActivitySource, the assumption that the tag IsCreatedByInstrumentation will be the first one is not correct. Custom samplers can add tags to activity during sampling which is done before the activity is started. In such cases the added tag IsCreatedByInstrumentation by instrumentation will not be the first one preventing the activity to get stopped. We need to update the logic to check the first occurrence of that tag for .NET7.0+.
Reproduce
Set the following sampler on this test and run it for .NET7.0
Runtime version
.NET7.0
Symptom
Background
In case of custom propagation a new activity is created with the context extracted from the propagator. Starting
.NET7.0
we use theActivitySource
on the activity created by ASP.NET Core to create and start this new activity. The activity is then later identified and stopped by checking the first tag.Issue
As the activity is created using
ActivitySource
, the assumption that the tagIsCreatedByInstrumentation
will be the first one is not correct. Custom samplers can add tags to activity during sampling which is done before the activity is started. In such cases the added tagIsCreatedByInstrumentation
by instrumentation will not be the first one preventing the activity to get stopped. We need to update the logic to check the first occurrence of that tag for.NET7.0
+.Reproduce
Set the following sampler on this test and run it for
.NET7.0
The text was updated successfully, but these errors were encountered: