Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ public async Task DistributedTracing_Works(ActivityIdFormat idFormat)
},
};

// Microsoft.ApplicationInsights (transitive dependency brought in by
// Microsoft.Testing.Extensions.Telemetry) sets Activity.ForceDefaultIdFormat = true
// globally, which forces every new Activity to use W3C format regardless of the
// parent activity's format. Disable the override so that child activities inherit
// the parent's format as they would in a normal application.
Activity.ForceDefaultIdFormat = false;

var clientActivity = new Activity("Foo");
clientActivity.SetIdFormat(idFormat);
clientActivity.TraceStateString = "Bar";
Expand Down
Loading