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
TBuilderThe builder instance.
loggerFactory
ILoggerFactoryThe 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
orloggerFactory
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
TBuilderThe builder instance.
options
TelemetryOptionsThe 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
oroptions
is null.