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.
Represents the callback method that's used in the extract methods of propagators. The callback is invoked to look up the value of a named field.
Represents the callback method that's used in propagators' inject methods. This callback is invoked to set the value of a named field.
Propagators may invoke it multiple times in order to set multiple fields.
Get or set the process-wide propagator object to use as the current selected propagator.
Gets the set of field names this propagator is likely to read or write.
protected DistributedContextPropagator()
Initializes an instance of the DistributedContextPropagator class. This constructor is protected and only meant to be called from parent classes.
Returns the default propagator object that Current will be initialized with.
Returns a propagator that does not transmit any distributed context information in outbound network messages.
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.
public abstract IEnumerable<KeyValuePair<string, string>> ExtractBaggage(object carrier, PropagatorGetterCallback getter)
Extracts the baggage key-value pair list from an incoming request represented by the carrier. For example, from the headers of an HTTP request.
public abstract void ExtractTraceIdAndState(object carrier, PropagatorGetterCallback getter, out string traceId, out string traceState)
Extracts the trace ID and trace state from an incoming request represented by the carrier. For example, from the headers of an HTTP request.
Injects the trace values stroed in the Activity object into a carrier. For example, into the headers of an HTTP request.