<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="11.0.0-preview.2.26159.112" />

System.Diagnostics.DistributedContextPropagator

public abstract class DistributedContextPropagator
An implementation of DistributedContextPropagator determines if and how distributed context information is encoded and decoded as it traverses the network. The encoding can be transported over any network protocol that supports string key-value pairs. For example, when using HTTP, each key-value pair is an HTTP header. DistributedContextPropagator injects values into and extracts values from carriers as string key-value pairs.
namespace System.Diagnostics { public abstract class DistributedContextPropagator { [System.Runtime.CompilerServices.NullableContext(0)] public delegate void PropagatorGetterCallback (object carrier, string fieldName, out string fieldValue, out IEnumerable<string> fieldValues); [System.Runtime.CompilerServices.NullableContext(0)] public delegate void PropagatorSetterCallback (object carrier, string fieldName, string fieldValue); public abstract IReadOnlyCollection<string> Fields { get; } public static DistributedContextPropagator Current { get; set; } public abstract void Inject(Activity activity, object carrier, PropagatorSetterCallback setter); public abstract void ExtractTraceIdAndState(object carrier, PropagatorGetterCallback getter, out string traceId, out string traceState); public abstract IEnumerable<KeyValuePair<string, string>> ExtractBaggage(object carrier, PropagatorGetterCallback getter); public static DistributedContextPropagator CreateDefaultPropagator(); public static DistributedContextPropagator CreatePassThroughPropagator(); public static DistributedContextPropagator CreateW3CPropagator(); public static DistributedContextPropagator CreatePreW3CPropagator(); public static DistributedContextPropagator CreateNoOutputPropagator(); protected DistributedContextPropagator(); } }