Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Diagnostics.​DistributedContextPropagator

Assembly: System.Diagnostics.DiagnosticSource

Inheritance: object → DistributedContextPropagator

An implementation of <see cref="T:System.Diagnostics.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. <see cref="T:System.Diagnostics.DistributedContextPropagator" /> injects values into and extracts values from carriers as string key-value pairs.

Properties

Gets the set of field names this propagator is likely to read or write.
Current
Get or set the process-wide propagator object to use as the current selected propagator.

Methods

public void
Inject​(Activity activity, object carrier, PropagatorSetterCallback setter)
public void
ExtractTraceIdAndState​(object carrier, PropagatorGetterCallback getter, String& traceId, String& traceState)
ExtractBaggage​(object carrier, PropagatorGetterCallback getter)
CreateDefaultPropagator​()
Returns the default propagator object that <see cref="P:System.Diagnostics.DistributedContextPropagator.Current" /> will be initialized with.
Returns An instance of the <see cref="T:System.Diagnostics.DistributedContextPropagator" /> class.
CreatePassThroughPropagator​()
Returns a propagator that attempts to act transparently, emitting the same data on outbound network requests that was received on the inbound request. When encoding the outbound message, this propagator uses information from the request's root Activity, ignoring any intermediate Activities that may have been created while processing the request.
Returns An instance of the <see cref="T:System.Diagnostics.DistributedContextPropagator" /> class.
CreateNoOutputPropagator​()
Returns a propagator that does not transmit any distributed context information in outbound network messages.
Returns An instance of the <see cref="T:System.Diagnostics.DistributedContextPropagator" /> class.
CreatePreW3CPropagator​()
Returns a propagator that encodes and decodes distributed context and baggage information in a backward-compatible manner.
CreateW3CPropagator​()
Returns a propagator that encodes and decodes distributed context information in accordance with the W3C Trace Context and Baggage specifications.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object