Brighter icon indicating copy to clipboard operation
Brighter copied to clipboard

[Feature] Support Polly Context

Open iancooper opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. We cannot access the Polly Context in a policy, to allow logging for example, because we do not use the version of ExecuteAsync which supplies a context

Describe the solution you'd like Pass a Polly Context to the ExecuteAsync call. We may need to use our own internal context to transport a Polly Context through to the handler site. Consumers can then set the Polly Context in the context bag and thus pass values into the call handling site.

Describe alternatives you've considered There are few options around the pipeline that allow us to access the Polly context when logging. We might be able to log the exception that bubbles out of Polly etc. but we don't get to see the parameters of the retry or fallback

Additional context Polly Contexts: https://github.com/App-vNext/Polly/wiki/Keys-and-Context-Data

iancooper avatar Jul 16 '20 15:07 iancooper