aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

Add Exception to ApiCallAttempt metrics

Open swaranga opened this issue 4 years ago • 3 comments

If an SDK calls throws an exception (Http timeout, Resource not found exception), it would be useful to capture that as part of the ApiCallAttempt metrics collection.

Especially for an Http timeout, the SDK will make a bunch of attempts but for each attempt it will log only the SigningDuration and BackoffDelayDuration metric. If we want to investigate what happened to a particularly high latency call, looking at the detailed ApiCallAttempt metric would not give us the right hints. But having the Exception instance for each call attempt will be incredibly helpful.

Please consider adding an Exception metric record to the ApiCallAttempt metrics - this is currently done in the V1 SDK so should ideally be also made available to the V2 SDK.

swaranga avatar May 19 '21 00:05 swaranga

Thank you for reaching out @swaranga. Marking this as a feature request to include the number of Exceptions as a client-side metric.

debora-ito avatar May 20 '21 16:05 debora-ito

Actually the number of Exceptions isn't really that helpful, instead it should include the Exception itself as a MetricRecord whose value parameter is the actual instance of the Exception (example HttpTimeoutException or ResourceNotFoundException or InternalServerFailureException etc). It should be collected in the ApiCallAttempt Metric collection.

swaranga avatar May 20 '21 19:05 swaranga

Ping. Any updates?

swaranga avatar Jul 14 '21 00:07 swaranga