DistributedContextPropagator.ExtractTraceIdAndState 方法

定义

从由运营商表示的传入请求中提取跟踪 ID 和跟踪状态。 例如,来自 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

要调用以从运营商获取传播跟踪 ID 和状态的回调方法。

traceId
String

此方法返回时,包含从运营商提取的跟踪 ID。

traceState
String

此方法返回时,包含从载波中提取的跟踪状态。

适用于