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
{{ message }}
Repository navigation
ActivityTraceFlags is not reflected in Activity Id when updated after activity start() #61857
ActivityTraceFlags can be updated after activity is started. However, doing so does not update the activity Id.
Reproduction Steps
varactivity=newActivity("Test");activity.Start();Console.WriteLine("ActivityId Before TraceFlags are set: "+activity.Id);Console.WriteLine("ActivityTraceFlags Before: "+activity.ActivityTraceFlags);activity.ActivityTraceFlags|=ActivityTraceFlags.Recorded;Console.WriteLine("ActivityId After TraceFlags are set: "+activity.Id);Console.WriteLine("ActivityTraceFlags After: "+activity.ActivityTraceFlags);
---- sample output ----
ActivityId Before TraceFlags are set: 00-b33ee4ebf1fa3d81e0ab30363fe291e2-40f3aace946db1d2-00
ActivityTraceFlags Before: None
ActivityId After TraceFlags are set: 00-b33ee4ebf1fa3d81e0ab30363fe291e2-40f3aace946db1d2-00
ActivityTraceFlags After: Recorded
Expected behavior
Updated ActivityTraceFlags is reflected in Activity.Id
Actual behavior
Updated ActivityTraceFlags is not reflected in Activity.Id
For now, there are workarounds which needs to tried first. This issue requires no action, until the workarounds are tried in OpenTelemetry/ApplicationInsights.
Activity
vishweshbankwar commentedon Nov 19, 2021
@cijothomas @tarekgh - Adding it here for tracking.
cijothomas commentedon Nov 22, 2021
For now, there are workarounds which needs to tried first. This issue requires no action, until the workarounds are tried in OpenTelemetry/ApplicationInsights.