Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Expose Policy Key when Exceptions Thrown #2411

Open
matthawley opened this issue Dec 6, 2024 · 2 comments
Open

[Feature request]: Expose Policy Key when Exceptions Thrown #2411

matthawley opened this issue Dec 6, 2024 · 2 comments

Comments

@matthawley
Copy link

Is your feature request related to a specific problem? Or an existing feature?

We are looking at the feasibility of getting the policy key an associated exception is thrown from, specifically BrokenCircuitException. Is there a way this can be added as additional information to this (and other) exceptions when they're thrown?

Describe the solution you'd like

The PolicyKey from the associated circuit breaker policy exposed on BrokenCircuitException.

Additional context

This might be useful for any other exceptions that may be thrown from other policies where the policy key is set.

@martincostello
Copy link
Member

This sounds like an effective duplicate of #2345, except for our "v7" API.

If that's the case, we're not really investing in new features in the old API at this stage. Instead if you want to use such functionality, you should migrate to use the new resilience pipeline functionality in Polly.Core from v8+.

@matthawley
Copy link
Author

Okay, I'll check that out to see if it helps solve some issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants