Skip to content

[Feature] Support Polly Context #1197

Description

@iancooper

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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions