共用方式為


DistributedContextPropagator.ExtractTraceIdAndState 方法

定義

從貨運公司所代表的傳入要求擷取追蹤標識碼和追蹤狀態。 例如,來自 HTTP 要求的標頭。

public:
 abstract void ExtractTraceIdAndState(System::Object ^ carrier, System::Diagnostics::DistributedContextPropagator::PropagatorGetterCallback ^ getter, [Runtime::InteropServices::Out] System::String ^ % traceId, [Runtime::InteropServices::Out] System::String ^ % traceState);
public abstract void ExtractTraceIdAndState (object? carrier, System.Diagnostics.DistributedContextPropagator.PropagatorGetterCallback? getter, out string? traceId, out string? traceState);
abstract member ExtractTraceIdAndState : obj * System.Diagnostics.DistributedContextPropagator.PropagatorGetterCallback * string * string -> unit
Public MustOverride Sub ExtractTraceIdAndState (carrier As Object, getter As DistributedContextPropagator.PropagatorGetterCallback, ByRef traceId As String, ByRef traceState As String)

參數

carrier
Object

要從中讀取值的媒體。

getter
DistributedContextPropagator.PropagatorGetterCallback

要叫用的回呼方法,可從貨運公司取得傳播追蹤標識符和狀態。

traceId
String

這個方法傳回時,會包含從貨運公司擷取的追蹤標識符。

traceState
String

當這個方法傳回時,會包含從貨運公司擷取的追蹤狀態。

適用於