Class CorrelationManagerTracingStrategy
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
Synchronizes activities as set by the CorrelationManager class over RPC.
public class CorrelationManagerTracingStrategy : IActivityTracingStrategy
- Inheritance
-
CorrelationManagerTracingStrategy
- Implements
- Inherited Members
Properties
TraceSource
Gets or sets the TraceSource that will receive the activity transfer, start and stop events .
public TraceSource? TraceSource { get; set; }
Property Value
TraceState
Gets or sets the contextual tracestate
value.
public static string? TraceState { get; set; }
Property Value
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.
GetInboundActivityName(JsonRpcRequest)
Determines the name to give to the activity started when dispatching an incoming RPC call.
protected virtual string? GetInboundActivityName(JsonRpcRequest request)
Parameters
request
JsonRpcRequestThe inbound RPC request.
Returns
- string
The name of the activity.
Remarks
The default implementation uses Method as the activity name.