Collect timeout metrics for call attempts
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
### Describe the feature
I propose that the SDK collects timeout metrics for call attempts.
Current docs for available metrics, as reference:
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/metrics-list.html
### Use Case
The SDK allows users to tweak timeout values. Users can utilize the existing latency metrics to inform their decision about appropriate timeout values in the SDK, but it would be very helpful to have dedicated timeout metrics to see the direct effect of any changes.
### Proposed Solution
_No response_
### Other Information
I tried using an ExecutionInterceptor, which offers hooks into different points in the request/response lifecycle, with the intention of creating the timeout metric myself.
It seemed promising but unfortunately it couldn't make it work:
- response hooks don't run because the timeout is supposed to trigger before the response is available
- exception hooks only run when the request as a whole fails, giving you the final failure that is thrown, but doesn't run for each underlying call attempt, and also doesn't keep track of all failures that caused each retry
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS Java SDK version used
v2
### JDK version used
Corretto 11
### Operating System and version
Amazon Linux 2
Contributor guide
Assessment
This issue has not been assessed yet.