In C# I'm using Polly Version=8.4.1 and a reusable retry ResiliencePipeline via ResiliencePipelineBuilder.
return new ResiliencePipelineBuilder() .AddRetry(new RetryStrategyOptions { MaxRetryAttempts = 5, DelayGenerator = {blah(blah, blah);}, ShouldHandle = args => { blahblah(blah); } }).Build();
I want to be able to add logging for when the operation initially fails but subsequently succeeds. Something like:
{operations} recovered after 3 tries, in 22 seconds
I believe in older versions of Polly this would be accomplished by injecting handling via the OnSuccess operation.
How is this done in v8.x?