Table of Contents

Class TelemetryResiliencePipelineBuilderExtensions

Namespace
Polly
Assembly
Polly.Extensions.dll

The telemetry extensions for the ResiliencePipelineBuilder.

public static class TelemetryResiliencePipelineBuilderExtensions
Inheritance
TelemetryResiliencePipelineBuilderExtensions
Inherited Members

Methods

ConfigureTelemetry<TBuilder>(TBuilder, ILoggerFactory)

Enables telemetry for this builder.

public static TBuilder ConfigureTelemetry<TBuilder>(this TBuilder builder, ILoggerFactory loggerFactory) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

loggerFactory ILoggerFactory

The logger factory to be used for logging.

Returns

TBuilder

The builder instance with the telemetry enabled.

Type Parameters

TBuilder

The builder type.

Remarks

By enabling telemetry, the resilience pipeline will log and meter all resilience events. Additionally, the telemetry strategy that logs and meters the executions is added to the beginning of the composite strategy.

Exceptions

ArgumentNullException

Thrown when builder or loggerFactory is null.

ConfigureTelemetry<TBuilder>(TBuilder, TelemetryOptions)

Enables telemetry for this builder.

public static TBuilder ConfigureTelemetry<TBuilder>(this TBuilder builder, TelemetryOptions options) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

options TelemetryOptions

The resilience telemetry options.

Returns

TBuilder

The builder instance with the telemetry enabled.

Type Parameters

TBuilder

The builder type.

Remarks

By enabling telemetry, the resilience pipeline will log and meter all resilience events. Additionally, the telemetry strategy that logs and meters the executions is added to the beginning of the composite strategy.

Exceptions

ArgumentNullException

Thrown when builder or options is null.