-
Notifications
You must be signed in to change notification settings - Fork 6k
[Breaking change]: Switch the default trace context propagator from Legacy to W3C #45793
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
Comments
@tarekgh Is this going out with the Preview 4 release? |
@CamSoper Yes, the plan is to get this in preview 4. You can watch the PR dotnet/runtime#114583 to know when this will get merged. |
@gewarren We don't seem to have an existing "diagnostics" area in the breaking changes. Do we create a new one or does this fit under one of the existing ones? |
Typically these go in the Core .NET libraries area. Also, did you mean to pin this issue for everyone? |
@gewarren I did not. How did I do that and how do I undo it? |
@CamSoper I unpinned it for you. It's the second last option in the right-hand rail. |
Description
DistributedContextPropagator is the type used to encode trace context and baggage values for propagation across process/machine boundaries. Historically, .NET used a legacy propagator as the default, which propagated baggage using the
Correlation-Context
header name. However, this legacy propagator is not fully compliant with the W3C Trace Context and Baggage specifications.Starting with .NET 10, we are adopting the W3C propagator as the default. The new W3C propagator differs from the legacy one in several key ways:
dotnet/runtime#114583
dotnet/runtime#114584
Version
.NET 10
Previous behavior
DistributedContextPropagator.CreateDefaultPropagator()
was returning instance of the legacy propagator and by defaultDistributedContextPropagator.Current
was set to that legacy instance.New behavior
DistributedContextPropagator.CreateDefaultPropagator()
will return instance of the W3C propagator and by defaultDistributedContextPropagator.Current
will be set to that W3C instance.Type of breaking change
Reason for change
This change is to fully comply with the W3C specification for propagating the trace context and baggage.
Recommended action
In .NET, we are exposing a new API
DistributedContextPropagator.CreatePreW3CPropagator()
to allow retrieve the legacy propagator instance to use if want to get the old behavior. Users can do the following to get the old behavior.Feature area
Diagnostics
Affected APIs
The text was updated successfully, but these errors were encountered: