Class ActivityTracingStrategy
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
Synchronizes activities as set by the Activity class over RPC.
public class ActivityTracingStrategy : IActivityTracingStrategy
- Inheritance
-
ActivityTracingStrategy
- Implements
- Inherited Members
Constructors
ActivityTracingStrategy()
Initializes a new instance of the ActivityTracingStrategy class.
public ActivityTracingStrategy()
ActivityTracingStrategy(ActivitySource?)
Initializes a new instance of the ActivityTracingStrategy class.
public ActivityTracingStrategy(ActivitySource? activitySource)
Parameters
activitySource
ActivitySourceThe ActivitySource to use for creating activities.
Methods
ApplyInboundActivity(JsonRpcRequest)
Applies an activity described in an incoming RPC request to the current context so the dispatched method can inherit it.
public IDisposable? ApplyInboundActivity(JsonRpcRequest request)
Parameters
request
JsonRpcRequestThe inbound RPC request.
Returns
- IDisposable
An optional disposable object that can revert the effects taken by this method at the conclusion of the dispatched RPC server method.
Remarks
This method may be invoked regardless of whether an activity is identified in the incoming request.
The request
may be referenced by the returned IDisposable value if necessary.
ApplyOutboundActivity(JsonRpcRequest)
Applies a contextual activity to an outbound RPC request.
public void ApplyOutboundActivity(JsonRpcRequest request)
Parameters
request
JsonRpcRequestThe outbound RPC request.
Remarks
This method may be invoked regardless of whether a contextual activity exists.