Table of Contents

Class TelemetryOptions

Namespace
Polly.Telemetry
Assembly
Polly.Extensions.dll

The options that are used to configure the telemetry that is produced by the resilience strategies.

public class TelemetryOptions
Inheritance
TelemetryOptions
Inherited Members

Properties

LoggerFactory

Gets or sets the logger factory.

[Required]
public ILoggerFactory LoggerFactory { get; set; }

Property Value

ILoggerFactory

The default value is Instance.

MeteringEnrichers

Gets the collection of telemetry enrichers.

public ICollection<MeteringEnricher> MeteringEnrichers { get; }

Property Value

ICollection<MeteringEnricher>

The default value is an empty collection.

ResultFormatter

Gets or sets the result formatter.

[Required]
public Func<ResilienceContext, object?, object?> ResultFormatter { get; set; }

Property Value

Func<ResilienceContext, object, object>

The default value is a formatter that returns a status code for HTTP based responses and the result as-is for all other result types. This property is required.

TelemetryListeners

Gets the collection of telemetry listeners.

public ICollection<TelemetryListener> TelemetryListeners { get; }

Property Value

ICollection<TelemetryListener>

The default value is an empty collection.