Table of Contents

Class ResilienceStrategyTelemetry

Namespace
Polly.Telemetry
Assembly
Polly.Core.dll

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 ResilienceEvent

The reported resilience event.

context ResilienceContext

The resilience context associated with this event.

args TArgs

The 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 ResilienceEvent

The reported resilience event.

context ResilienceContext

The resilience context associated with this event.

outcome Outcome<TResult>

The outcome associated with the event.

args TArgs

The event arguments.

Type Parameters

TArgs

The arguments associated with this event.

TResult

The type of the result.