Describe the feature
Hi!
I want the RetryToken class to expose the fields attempt count, scope and status so I can get visibility when a retry is happening.
Cheers
Ruwen
Use Case
I am currently migrating from the SDK v1. In the SDK v1 I got custom retry condition which extends PredefinedRetryPolicies.SDKDefaultRetryCondition.
I do that in order to log retries:
public boolean shouldRetry(AmazonWebServiceRequest originalRequest, AmazonClientException exception, int retriesAttempted) {
boolean retry = super.shouldRetry(originalRequest, exception, retriesAttempted);
String source = originalRequest.getClass().getSimpleName();
LOGGER.warn("Retrying: {}, Retry Attempt: {}, Source: {}, Exception: {}", retry, retriesAttempted, source, exception.getMessage());
return retry;
}
In the past that has been quite helpful and so I want to keep that behaviour.
Currently the RetryToken doesn't expose any fields. If I log toString() on the retry token, then the log message is way to verbose.
Proposed Solution
Expose the fields:
Other Information
No response
Acknowledgements
AWS Java SDK version used
2.29.52
JDK version used
17
Operating System and version
Debian stable
Describe the feature
Hi!
I want the RetryToken class to expose the fields attempt count, scope and status so I can get visibility when a retry is happening.
Cheers
Ruwen
Use Case
I am currently migrating from the SDK v1. In the SDK v1 I got custom retry condition which extends PredefinedRetryPolicies.SDKDefaultRetryCondition.
I do that in order to log retries:
In the past that has been quite helpful and so I want to keep that behaviour.
Currently the RetryToken doesn't expose any fields. If I log toString() on the retry token, then the log message is way to verbose.
Proposed Solution
Expose the fields:
Other Information
No response
Acknowledgements
AWS Java SDK version used
2.29.52
JDK version used
17
Operating System and version
Debian stable