OpenTelemetryScope.InjectTraceContext Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Injects this span's trace context into W3C HTTP headers.
public System.Collections.Generic.Dictionary<string,string> InjectTraceContext();
member this.InjectTraceContext : unit -> System.Collections.Generic.Dictionary<string, string>
Public Function InjectTraceContext () As Dictionary(Of String, String)
Returns
A dictionary containing W3C trace context headers. Returns an empty dictionary if no activity exists.
Remarks
Returns a dictionary containing traceparent and optionally tracestate headers that can be forwarded to downstream services for distributed trace propagation.