Skip to content

Collect timeout metrics for call attempts #3240

@ebautistabar

Description

@ebautistabar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p3This is a minor priority issuesdk-metrics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions