ExecutionInterceptor access to request attempt exceptions
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
Maybe this is just a documentation change that is needed but reading through the `ExecutionInterceptor` comments and traversing through the code I don't see a way to get access to the intermediate exceptions that get retried.
## Expected Behavior
`ExecutionInterceptor` should have a hook like `onRequestFailure` that would give access to the exception for a specific HTTP request. This would provide the ability to see throttles and other types of events at the request level when it may resolve during the retries.
## Current Behavior
The current behavior as I understand it is to add some internal state to the retry handler but to only emit that once the retries have been exhausted.
## Possible Solution
Add a new Stage for `RequestFailure` that the `RetryableStage` can delegate to for these hooks
## Context
When we instrumented the V1 SDK we had the ability to retrieve the intermediate exceptions. With V2 that is not possible at the moment. See https://github.com/openzipkin/zipkin-aws/issues/116 for the corresponding issue on our end.
Contributor guide
Assessment
This issue has not been assessed yet.