次の方法で共有


TraceContextHelper.GetTraceparent(IDictionary<String,String>) Method

Definition

Returns the W3C traceparent value from a headers dictionary.

public static string? GetTraceparent(System.Collections.Generic.IDictionary<string,string> headers);
static member GetTraceparent : System.Collections.Generic.IDictionary<string, string> -> string
Public Shared Function GetTraceparent (headers As IDictionary(Of String, String)) As String

Parameters

headers
IDictionary<String,String>

Dictionary of HTTP headers, typically obtained from InjectTraceContext().

Returns

The traceparent string (e.g. "00-{trace_id}-{span_id}-{flags}"), or null if the key is not present.

Applies to