Class ResilienceStrategyTelemetry
Resilience telemetry is used by individual resilience strategies to report some important events.
public sealed class ResilienceStrategyTelemetry
- Inheritance
-
ResilienceStrategyTelemetry
- Inherited Members
Remarks
For example, the timeout strategy reports "OnTimeout" event when the timeout is reached or "OnRetry" for retry strategy.
Methods
Report<TArgs>(ResilienceEvent, ResilienceContext, TArgs)
Reports an event that occurred in a resilience strategy.
public void Report<TArgs>(ResilienceEvent resilienceEvent, ResilienceContext context, TArgs args)
Parameters
resilienceEvent
ResilienceEventThe reported resilience event.
context
ResilienceContextThe resilience context associated with this event.
args
TArgsThe event arguments.
Type Parameters
TArgs
The arguments associated with this event.
Exceptions
- ArgumentNullException
Thrown when
context
is null.
Report<TArgs, TResult>(ResilienceEvent, ResilienceContext, Outcome<TResult>, TArgs)
Reports an event that occurred in a resilience strategy.
public void Report<TArgs, TResult>(ResilienceEvent resilienceEvent, ResilienceContext context, Outcome<TResult> outcome, TArgs args)
Parameters
resilienceEvent
ResilienceEventThe reported resilience event.
context
ResilienceContextThe resilience context associated with this event.
outcome
Outcome<TResult>The outcome associated with the event.
args
TArgsThe event arguments.
Type Parameters
TArgs
The arguments associated with this event.
TResult
The type of the result.