次の方法で共有


OpenTelemetryScope.InjectTraceContext Method

Definition

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.

Applies to