Skip to content

Commit

Permalink
Introduce TelemetryListener
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Aug 14, 2023
1 parent 4a8c59a commit c5c2f29
Show file tree
Hide file tree
Showing 59 changed files with 684 additions and 793 deletions.
27 changes: 16 additions & 11 deletions bench/Polly.Core.Benchmarks/TelemetryBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,7 @@ private ResiliencePipeline Build(ResiliencePipelineBuilder builder)

if (Enrichment)
{
options.Enrichers.Add(context =>
{
// The Microsoft.Extensions.Resilience library will add around 6 additional tags
// https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.Resilience
context.Tags.Add(new("dummy1", "dummy"));
context.Tags.Add(new("dummy2", "dummy"));
context.Tags.Add(new("dummy3", "dummy"));
context.Tags.Add(new("dummy4", "dummy"));
context.Tags.Add(new("dummy5", "dummy"));
context.Tags.Add(new("dummy6", "dummy"));
});
options.MeteringEnrichers.Add(new CustomEnricher());
}

builder.ConfigureTelemetry(options);
Expand All @@ -66,6 +56,21 @@ private ResiliencePipeline Build(ResiliencePipelineBuilder builder)
return builder.Build();
}

private class CustomEnricher : MeteringEnricher
{
public override void Enrich<TResult, TArgs>(in EnrichmentContext<TResult, TArgs> context)
{
// The Microsoft.Extensions.Resilience library will add around 6 additional tags
// https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.Resilience
context.Tags.Add(new("dummy1", "dummy"));
context.Tags.Add(new("dummy2", "dummy"));
context.Tags.Add(new("dummy3", "dummy"));
context.Tags.Add(new("dummy4", "dummy"));
context.Tags.Add(new("dummy5", "dummy"));
context.Tags.Add(new("dummy6", "dummy"));
}
}

private class TelemetryEventStrategy : ResilienceStrategy
{
private readonly ResilienceStrategyTelemetry _telemetry;
Expand Down
6 changes: 4 additions & 2 deletions src/Polly.Core/CircuitBreaker/OnCircuitClosedArguments.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
namespace Polly.CircuitBreaker;

#pragma warning disable CA1815 // Override equals and operator equals on value types

/// <summary>
/// Arguments used by <see cref="CircuitBreakerStrategyOptions{TResult}.OnClosed"/> event.
/// </summary>
public sealed class OnCircuitClosedArguments
public readonly struct OnCircuitClosedArguments
{
/// <summary>
/// Initializes a new instance of the <see cref="OnCircuitClosedArguments"/> class.
/// Initializes a new instance of the <see cref="OnCircuitClosedArguments"/> struct.
/// </summary>
/// <param name="isManual">Indicates whether the circuit was closed manually by using <see cref="CircuitBreakerManualControl"/>.</param>
public OnCircuitClosedArguments(bool isManual) => IsManual = isManual;
Expand Down
6 changes: 4 additions & 2 deletions src/Polly.Core/CircuitBreaker/OnCircuitHalfOpenedArguments.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
namespace Polly.CircuitBreaker;

#pragma warning disable CA1815 // Override equals and operator equals on value types

/// <summary>
/// Arguments used by <see cref="CircuitBreakerStrategyOptions{TResult}.OnHalfOpened"/> event.
/// </summary>
public sealed class OnCircuitHalfOpenedArguments
public readonly struct OnCircuitHalfOpenedArguments
{
/// <summary>
/// Initializes a new instance of the <see cref="OnCircuitHalfOpenedArguments"/> class.
/// Initializes a new instance of the <see cref="OnCircuitHalfOpenedArguments"/> struct.
/// </summary>
/// <param name="context">The context instance.</param>
public OnCircuitHalfOpenedArguments(ResilienceContext context) => Context = context;
Expand Down
6 changes: 4 additions & 2 deletions src/Polly.Core/CircuitBreaker/OnCircuitOpenedArguments.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
namespace Polly.CircuitBreaker;

#pragma warning disable CA1815 // Override equals and operator equals on value types

/// <summary>
/// Arguments used by <see cref="CircuitBreakerStrategyOptions{TResult}.OnOpened"/> event.
/// </summary>
public sealed class OnCircuitOpenedArguments
public readonly struct OnCircuitOpenedArguments
{
/// <summary>
/// Initializes a new instance of the <see cref="OnCircuitOpenedArguments"/> class.
/// Initializes a new instance of the <see cref="OnCircuitOpenedArguments"/> struct.
/// </summary>
/// <param name="breakDuration">The duration of break.</param>
/// <param name="isManual">Indicates whether the circuit was opened manually by using <see cref="CircuitBreakerManualControl"/>.</param>
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.Core/Fallback/FallbackResilienceStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected internal override async ValueTask<Outcome<T>> ExecuteCore<TState>(Func
return outcome;
}

var onFallbackArgs = new OutcomeArguments<T, OnFallbackArguments>(context, outcome, new OnFallbackArguments());
var onFallbackArgs = new OutcomeArguments<T, OnFallbackArguments>(context, outcome, default);

_telemetry.Report(new(ResilienceEventSeverity.Warning, FallbackConstants.OnFallback), onFallbackArgs);

Expand Down
2 changes: 1 addition & 1 deletion src/Polly.Core/Fallback/OnFallbackArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ namespace Polly.Fallback;
/// <summary>
/// Represents arguments used in fallback handling scenarios.
/// </summary>
public sealed class OnFallbackArguments
public readonly struct OnFallbackArguments
{
}
6 changes: 4 additions & 2 deletions src/Polly.Core/Hedging/OnHedgingArguments.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
namespace Polly.Hedging;

#pragma warning disable CA1815 // Override equals and operator equals on value types

/// <summary>
/// Represents arguments used by the on-hedging event.
/// </summary>
public sealed class OnHedgingArguments
public readonly struct OnHedgingArguments
{
/// <summary>
/// Initializes a new instance of the <see cref="OnHedgingArguments"/> class.
/// Initializes a new instance of the <see cref="OnHedgingArguments"/> struct.
/// </summary>
/// <param name="attemptNumber">The zero-based hedging attempt number.</param>
/// <param name="hasOutcome">Indicates whether outcome is available.</param>
Expand Down
43 changes: 28 additions & 15 deletions src/Polly.Core/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ abstract Polly.ResilienceContextPool.Get(string? operationKey, System.Threading.
abstract Polly.ResilienceContextPool.Return(Polly.ResilienceContext! context) -> void
abstract Polly.ResilienceStrategy.ExecuteCore<TResult, TState>(System.Func<Polly.ResilienceContext!, TState, System.Threading.Tasks.ValueTask<Polly.Outcome<TResult>>>! callback, Polly.ResilienceContext! context, TState state) -> System.Threading.Tasks.ValueTask<Polly.Outcome<TResult>>
abstract Polly.ResilienceStrategy<TResult>.ExecuteCore<TState>(System.Func<Polly.ResilienceContext!, TState, System.Threading.Tasks.ValueTask<Polly.Outcome<TResult>>>! callback, Polly.ResilienceContext! context, TState state) -> System.Threading.Tasks.ValueTask<Polly.Outcome<TResult>>
abstract Polly.Telemetry.TelemetryListener.Write<TResult, TArgs>(in Polly.Telemetry.TelemetryEventArguments<TResult, TArgs> args) -> void
override Polly.Outcome<TResult>.ToString() -> string!
override Polly.Registry.ResiliencePipelineRegistry<TKey>.TryGetPipeline(TKey key, out Polly.ResiliencePipeline? pipeline) -> bool
override Polly.Registry.ResiliencePipelineRegistry<TKey>.TryGetPipeline<TResult>(TKey key, out Polly.ResiliencePipeline<TResult>? pipeline) -> bool
Expand Down Expand Up @@ -44,11 +45,11 @@ Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.ManualControl.get ->
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.ManualControl.set -> void
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.MinimumThroughput.get -> int
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.MinimumThroughput.set -> void
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnClosed.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.CircuitBreaker.OnCircuitClosedArguments!>, System.Threading.Tasks.ValueTask>?
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnClosed.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.CircuitBreaker.OnCircuitClosedArguments>, System.Threading.Tasks.ValueTask>?
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnClosed.set -> void
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnHalfOpened.get -> System.Func<Polly.CircuitBreaker.OnCircuitHalfOpenedArguments!, System.Threading.Tasks.ValueTask>?
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnHalfOpened.get -> System.Func<Polly.CircuitBreaker.OnCircuitHalfOpenedArguments, System.Threading.Tasks.ValueTask>?
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnHalfOpened.set -> void
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnOpened.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.CircuitBreaker.OnCircuitOpenedArguments!>, System.Threading.Tasks.ValueTask>?
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnOpened.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.CircuitBreaker.OnCircuitOpenedArguments>, System.Threading.Tasks.ValueTask>?
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.OnOpened.set -> void
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.SamplingDuration.get -> System.TimeSpan
Polly.CircuitBreaker.CircuitBreakerStrategyOptions<TResult>.SamplingDuration.set -> void
Expand All @@ -67,13 +68,16 @@ Polly.CircuitBreaker.IsolatedCircuitException.IsolatedCircuitException(string! m
Polly.CircuitBreaker.IsolatedCircuitException.IsolatedCircuitException(string! message, System.Exception! innerException) -> void
Polly.CircuitBreaker.OnCircuitClosedArguments
Polly.CircuitBreaker.OnCircuitClosedArguments.IsManual.get -> bool
Polly.CircuitBreaker.OnCircuitClosedArguments.OnCircuitClosedArguments() -> void
Polly.CircuitBreaker.OnCircuitClosedArguments.OnCircuitClosedArguments(bool isManual) -> void
Polly.CircuitBreaker.OnCircuitHalfOpenedArguments
Polly.CircuitBreaker.OnCircuitHalfOpenedArguments.Context.get -> Polly.ResilienceContext!
Polly.CircuitBreaker.OnCircuitHalfOpenedArguments.OnCircuitHalfOpenedArguments() -> void
Polly.CircuitBreaker.OnCircuitHalfOpenedArguments.OnCircuitHalfOpenedArguments(Polly.ResilienceContext! context) -> void
Polly.CircuitBreaker.OnCircuitOpenedArguments
Polly.CircuitBreaker.OnCircuitOpenedArguments.BreakDuration.get -> System.TimeSpan
Polly.CircuitBreaker.OnCircuitOpenedArguments.IsManual.get -> bool
Polly.CircuitBreaker.OnCircuitOpenedArguments.OnCircuitOpenedArguments() -> void
Polly.CircuitBreaker.OnCircuitOpenedArguments.OnCircuitOpenedArguments(System.TimeSpan breakDuration, bool isManual) -> void
Polly.CircuitBreakerResiliencePipelineBuilderExtensions
Polly.ExecutionRejectedException
Expand All @@ -86,7 +90,7 @@ Polly.Fallback.FallbackStrategyOptions<TResult>
Polly.Fallback.FallbackStrategyOptions<TResult>.FallbackAction.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Fallback.FallbackPredicateArguments>, System.Threading.Tasks.ValueTask<Polly.Outcome<TResult>>>?
Polly.Fallback.FallbackStrategyOptions<TResult>.FallbackAction.set -> void
Polly.Fallback.FallbackStrategyOptions<TResult>.FallbackStrategyOptions() -> void
Polly.Fallback.FallbackStrategyOptions<TResult>.OnFallback.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Fallback.OnFallbackArguments!>, System.Threading.Tasks.ValueTask>?
Polly.Fallback.FallbackStrategyOptions<TResult>.OnFallback.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Fallback.OnFallbackArguments>, System.Threading.Tasks.ValueTask>?
Polly.Fallback.FallbackStrategyOptions<TResult>.OnFallback.set -> void
Polly.Fallback.FallbackStrategyOptions<TResult>.ShouldHandle.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Fallback.FallbackPredicateArguments>, System.Threading.Tasks.ValueTask<bool>>!
Polly.Fallback.FallbackStrategyOptions<TResult>.ShouldHandle.set -> void
Expand Down Expand Up @@ -117,14 +121,15 @@ Polly.Hedging.HedgingStrategyOptions<TResult>.HedgingDelayGenerator.set -> void
Polly.Hedging.HedgingStrategyOptions<TResult>.HedgingStrategyOptions() -> void
Polly.Hedging.HedgingStrategyOptions<TResult>.MaxHedgedAttempts.get -> int
Polly.Hedging.HedgingStrategyOptions<TResult>.MaxHedgedAttempts.set -> void
Polly.Hedging.HedgingStrategyOptions<TResult>.OnHedging.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Hedging.OnHedgingArguments!>, System.Threading.Tasks.ValueTask>?
Polly.Hedging.HedgingStrategyOptions<TResult>.OnHedging.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Hedging.OnHedgingArguments>, System.Threading.Tasks.ValueTask>?
Polly.Hedging.HedgingStrategyOptions<TResult>.OnHedging.set -> void
Polly.Hedging.HedgingStrategyOptions<TResult>.ShouldHandle.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Hedging.HedgingPredicateArguments>, System.Threading.Tasks.ValueTask<bool>>!
Polly.Hedging.HedgingStrategyOptions<TResult>.ShouldHandle.set -> void
Polly.Hedging.OnHedgingArguments
Polly.Hedging.OnHedgingArguments.AttemptNumber.get -> int
Polly.Hedging.OnHedgingArguments.Duration.get -> System.TimeSpan
Polly.Hedging.OnHedgingArguments.HasOutcome.get -> bool
Polly.Hedging.OnHedgingArguments.OnHedgingArguments() -> void
Polly.Hedging.OnHedgingArguments.OnHedgingArguments(int attemptNumber, bool hasOutcome, System.TimeSpan duration) -> void
Polly.HedgingResiliencePipelineBuilderExtensions
Polly.LegacySupport
Expand Down Expand Up @@ -250,12 +255,12 @@ Polly.ResiliencePipelineBuilder<TResult>
Polly.ResiliencePipelineBuilder<TResult>.Build() -> Polly.ResiliencePipeline<TResult>!
Polly.ResiliencePipelineBuilder<TResult>.ResiliencePipelineBuilder() -> void
Polly.ResiliencePipelineBuilderBase
Polly.ResiliencePipelineBuilderBase.DiagnosticSource.get -> System.Diagnostics.DiagnosticSource?
Polly.ResiliencePipelineBuilderBase.DiagnosticSource.set -> void
Polly.ResiliencePipelineBuilderBase.InstanceName.get -> string?
Polly.ResiliencePipelineBuilderBase.InstanceName.set -> void
Polly.ResiliencePipelineBuilderBase.Name.get -> string?
Polly.ResiliencePipelineBuilderBase.Name.set -> void
Polly.ResiliencePipelineBuilderBase.TelemetryListener.get -> Polly.Telemetry.TelemetryListener?
Polly.ResiliencePipelineBuilderBase.TelemetryListener.set -> void
Polly.ResiliencePipelineBuilderBase.Validator.get -> System.Action<Polly.ResilienceValidationContext!>!
Polly.ResiliencePipelineBuilderExtensions
Polly.ResilienceProperties
Expand Down Expand Up @@ -283,6 +288,7 @@ Polly.ResilienceValidationContext.ResilienceValidationContext(object! instance,
Polly.Retry.OnRetryArguments
Polly.Retry.OnRetryArguments.AttemptNumber.get -> int
Polly.Retry.OnRetryArguments.ExecutionTime.get -> System.TimeSpan
Polly.Retry.OnRetryArguments.OnRetryArguments() -> void
Polly.Retry.OnRetryArguments.OnRetryArguments(int attemptNumber, System.TimeSpan retryDelay, System.TimeSpan executionTime) -> void
Polly.Retry.OnRetryArguments.RetryDelay.get -> System.TimeSpan
Polly.Retry.RetryBackoffType
Expand All @@ -305,7 +311,7 @@ Polly.Retry.RetryStrategyOptions<TResult>.BackoffType.get -> Polly.Retry.RetryBa
Polly.Retry.RetryStrategyOptions<TResult>.BackoffType.set -> void
Polly.Retry.RetryStrategyOptions<TResult>.BaseDelay.get -> System.TimeSpan
Polly.Retry.RetryStrategyOptions<TResult>.BaseDelay.set -> void
Polly.Retry.RetryStrategyOptions<TResult>.OnRetry.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Retry.OnRetryArguments!>, System.Threading.Tasks.ValueTask>?
Polly.Retry.RetryStrategyOptions<TResult>.OnRetry.get -> System.Func<Polly.OutcomeArguments<TResult, Polly.Retry.OnRetryArguments>, System.Threading.Tasks.ValueTask>?
Polly.Retry.RetryStrategyOptions<TResult>.OnRetry.set -> void
Polly.Retry.RetryStrategyOptions<TResult>.Randomizer.get -> System.Func<double>!
Polly.Retry.RetryStrategyOptions<TResult>.Randomizer.set -> void
Expand All @@ -327,10 +333,12 @@ Polly.StrategyBuilderContext.Telemetry.get -> Polly.Telemetry.ResilienceStrategy
Polly.Telemetry.ExecutionAttemptArguments
Polly.Telemetry.ExecutionAttemptArguments.AttemptNumber.get -> int
Polly.Telemetry.ExecutionAttemptArguments.Duration.get -> System.TimeSpan
Polly.Telemetry.ExecutionAttemptArguments.ExecutionAttemptArguments() -> void
Polly.Telemetry.ExecutionAttemptArguments.ExecutionAttemptArguments(int attemptNumber, System.TimeSpan duration, bool handled) -> void
Polly.Telemetry.ExecutionAttemptArguments.Handled.get -> bool
Polly.Telemetry.PipelineExecutedArguments
Polly.Telemetry.PipelineExecutedArguments.Duration.get -> System.TimeSpan
Polly.Telemetry.PipelineExecutedArguments.PipelineExecutedArguments() -> void
Polly.Telemetry.PipelineExecutedArguments.PipelineExecutedArguments(System.TimeSpan duration) -> void
Polly.Telemetry.PipelineExecutingArguments
Polly.Telemetry.PipelineExecutingArguments.PipelineExecutingArguments() -> void
Expand All @@ -355,14 +363,19 @@ Polly.Telemetry.ResilienceTelemetrySource.PipelineInstanceName.get -> string?
Polly.Telemetry.ResilienceTelemetrySource.PipelineName.get -> string?
Polly.Telemetry.ResilienceTelemetrySource.ResilienceTelemetrySource(string? pipelineName, string? pipelineInstanceName, string? strategyName) -> void
Polly.Telemetry.ResilienceTelemetrySource.StrategyName.get -> string?
Polly.Telemetry.TelemetryEventArguments
Polly.Telemetry.TelemetryEventArguments.Arguments.get -> object!
Polly.Telemetry.TelemetryEventArguments.Context.get -> Polly.ResilienceContext!
Polly.Telemetry.TelemetryEventArguments.Event.get -> Polly.Telemetry.ResilienceEvent
Polly.Telemetry.TelemetryEventArguments.Outcome.get -> Polly.Outcome<object!>?
Polly.Telemetry.TelemetryEventArguments.Source.get -> Polly.Telemetry.ResilienceTelemetrySource!
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.Arguments.get -> TArgs
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.Context.get -> Polly.ResilienceContext!
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.Event.get -> Polly.Telemetry.ResilienceEvent
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.Outcome.get -> Polly.Outcome<TResult>?
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.Source.get -> Polly.Telemetry.ResilienceTelemetrySource!
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.TelemetryEventArguments() -> void
Polly.Telemetry.TelemetryEventArguments<TResult, TArgs>.TelemetryEventArguments(Polly.Telemetry.ResilienceTelemetrySource! source, Polly.Telemetry.ResilienceEvent resilienceEvent, Polly.ResilienceContext! context, TArgs args, Polly.Outcome<TResult>? outcome) -> void
Polly.Telemetry.TelemetryListener
Polly.Telemetry.TelemetryListener.TelemetryListener() -> void
Polly.Timeout.OnTimeoutArguments
Polly.Timeout.OnTimeoutArguments.Context.get -> Polly.ResilienceContext!
Polly.Timeout.OnTimeoutArguments.OnTimeoutArguments() -> void
Polly.Timeout.OnTimeoutArguments.OnTimeoutArguments(Polly.ResilienceContext! context, System.TimeSpan timeout) -> void
Polly.Timeout.OnTimeoutArguments.Timeout.get -> System.TimeSpan
Polly.Timeout.TimeoutGeneratorArguments
Expand All @@ -378,7 +391,7 @@ Polly.Timeout.TimeoutRejectedException.TimeoutRejectedException(string! message,
Polly.Timeout.TimeoutRejectedException.TimeoutRejectedException(string! message, System.TimeSpan timeout, System.Exception! innerException) -> void
Polly.Timeout.TimeoutRejectedException.TimeoutRejectedException(System.TimeSpan timeout) -> void
Polly.Timeout.TimeoutStrategyOptions
Polly.Timeout.TimeoutStrategyOptions.OnTimeout.get -> System.Func<Polly.Timeout.OnTimeoutArguments!, System.Threading.Tasks.ValueTask>?
Polly.Timeout.TimeoutStrategyOptions.OnTimeout.get -> System.Func<Polly.Timeout.OnTimeoutArguments, System.Threading.Tasks.ValueTask>?
Polly.Timeout.TimeoutStrategyOptions.OnTimeout.set -> void
Polly.Timeout.TimeoutStrategyOptions.Timeout.get -> System.TimeSpan
Polly.Timeout.TimeoutStrategyOptions.Timeout.set -> void
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.Core/Registry/ResiliencePipelineRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private static ResiliencePipeline CreatePipeline<TBuilder>(

var builder = factory();
var pipeline = builder.BuildPipeline();
var diagnosticSource = builder.DiagnosticSource;
var diagnosticSource = builder.TelemetryListener;

if (context.ReloadTokenProducer is null)
{
Expand Down
Loading

0 comments on commit c5c2f29

Please sign in to comment.