Class TelemetryOptions
The options that are used to configure the telemetry that is produced by the resilience strategies.
public class TelemetryOptions
- Inheritance
-
TelemetryOptions
- Inherited Members
Constructors
TelemetryOptions()
Initializes a new instance of the TelemetryOptions class.
public TelemetryOptions()
TelemetryOptions(TelemetryOptions)
Initializes a new instance of the TelemetryOptions class.
public TelemetryOptions(TelemetryOptions other)
Parameters
other
TelemetryOptionsThe telemetry options instance to copy the data from.
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.
SeverityProvider
Gets or sets the resilience event severity provider that allows customizing the severity of resilience events.
public Func<SeverityProviderArguments, ResilienceEventSeverity>? SeverityProvider { get; set; }
Property Value
- Func<SeverityProviderArguments, ResilienceEventSeverity>
The default value is null.
TelemetryListeners
Gets the collection of telemetry listeners.
public ICollection<TelemetryListener> TelemetryListeners { get; }
Property Value
- ICollection<TelemetryListener>
The default value is an empty collection.