Interface IActivityTracingStrategy
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
Synchronizes contextual activities between an RPC client and server consistent with the W3C Trace Context specification.
public interface IActivityTracingStrategy
Remarks
Implementations are required to be thread-safe.
Methods
ApplyInboundActivity(JsonRpcRequest)
Applies an activity described in an incoming RPC request to the current context so the dispatched method can inherit it.
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.
void ApplyOutboundActivity(JsonRpcRequest request)
Parameters
request
JsonRpcRequestThe outbound RPC request.
Remarks
This method may be invoked regardless of whether a contextual activity exists.