-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ActivityTraceFlags is not reflected in Activity Id when updated after activity start() #61857
Comments
Tagging subscribers to this area: @tarekgh Issue DetailsDescriptionActivityTraceFlags can be updated after activity is started. However, doing so does not update the activity Id. Reproduction Stepsvar activity = new Activity("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 ---- Expected behaviorUpdated ActivityTraceFlags is reflected in Activity.Id Actual behaviorUpdated ActivityTraceFlags is not reflected in Activity.Id Regression?No Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
@cijothomas @tarekgh - Adding it here for tracking. |
For now, there are workarounds which needs to tried first. This issue requires no action, until the workarounds are tried in OpenTelemetry/ApplicationInsights. |
Description
ActivityTraceFlags can be updated after activity is started. However, doing so does not update the activity Id.
Reproduction Steps
---- 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
Regression?
No
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: