DistributedContextPropagator.Inject 方法

定义

将存储在 对象中的 Activity 跟踪值注入到载体中。 例如,到 HTTP 请求的标头中。

public:
 abstract void Inject(System::Diagnostics::Activity ^ activity, System::Object ^ carrier, System::Diagnostics::DistributedContextPropagator::PropagatorSetterCallback ^ setter);
public abstract void Inject (System.Diagnostics.Activity? activity, object? carrier, System.Diagnostics.DistributedContextPropagator.PropagatorSetterCallback? setter);
abstract member Inject : System.Diagnostics.Activity * obj * System.Diagnostics.DistributedContextPropagator.PropagatorSetterCallback -> unit
Public MustOverride Sub Inject (activity As Activity, carrier As Object, setter As DistributedContextPropagator.PropagatorSetterCallback)

参数

activity
Activity

Activity 对象具有要注入到载体的分布式上下文。

carrier
Object

将存储分布式上下文的介质。

setter
DistributedContextPropagator.PropagatorSetterCallback

要调用以在载体上设置命名键值对的回调方法。

适用于