Replies: 1 comment
-
@yattoni hi! All your points are valid here: ErrorType is a String type so it won't be sent to CloudWatch as a metric; it will only be generated when the request fails and because of this we can't sent it as a dimension. Besides using Execution Interceptors to catch the ErrorType, I don't really have other suggestions. To make it easier to visualize, I used the LoggingMetricPublisher to list all the SDK metrics being generated, and I manually marked with a [40de8f93] ApiCall
[40de8f93] ┌──────────────────────────────────────────────────────────────────────┐
[40de8f93] │ *MarshallingDuration=PT0.008139291S │
[40de8f93] │ *RetryCount=0 │
[40de8f93] │ *ApiCallSuccessful=false │
[40de8f93] │ *OperationName=ListObjectsV2 │
[40de8f93] │ *EndpointResolveDuration=PT0.000137708S │
[40de8f93] │ *ApiCallDuration=PT0.190442459S │
[40de8f93] │ *CredentialsFetchDuration=PT1.43048075S │
[40de8f93] │ ServiceEndpoint=https://blablabla-bucket.s3.us-west-2.amazonaws.com │
[40de8f93] │ *ServiceId=S3 │
[40de8f93] └──────────────────────────────────────────────────────────────────────┘
[40de8f93] ApiCallAttempt
[40de8f93] ┌──────────────────────────────────────┐
[40de8f93] │ TimeToFirstByte=PT0.161417416S │
[40de8f93] │ *SigningDuration=PT0.010419292S │
[40de8f93] │ ReadThroughput=115462.0015248536 │
[40de8f93] │ ErrorType=ServerError │
[40de8f93] │ *ServiceCallDuration=PT0.161417416S │
[40de8f93] │ AwsExtendedRequestId=xxx │
[40de8f93] │ HttpStatusCode=301 │
[40de8f93] │ *BackoffDelayDuration=PT0S │
[40de8f93] │ TimeToLastByte=PT0.171481333S │
[40de8f93] │ AwsRequestId=xxx │
[40de8f93] └──────────────────────────────────────┘
[40de8f93] HttpClient
[40de8f93] ┌─────────────────────────────────────────┐
[40de8f93] │ *AvailableConcurrency=0 │
[40de8f93] │ *LeasedConcurrency=1 │
[40de8f93] │ *ConcurrencyAcquireDuration=PT0.004516S │
[40de8f93] │ *PendingConcurrencyAcquires=0 │
[40de8f93] │ *MaxConcurrency=50 │
[40de8f93] │ HttpClientName=Apache │
[40de8f93] └─────────────────────────────────────────┘ I'll move this to Discussions tab, see if anyone can share their ideas. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the issue
In your design for metrics and in the source code there exists an ErrorType metric. However it is a String which cannot be turned into a metric in the TimeBucketedMetrics class.
Since it is a String type, I believe it can only be used for Dimensions, which would mean I would have to extend the defaults to see it. But also, what metric would I use to alarm on if I had metrics with the error type dimension set? ApiCallSuccessful? But it wouldn't be successful so I'm just looking for the sample count of that?
The ErrorType also only gets recorded on exceptions here so unless the AWS service is failing I will never see ServerError metrics to create alarms for or know that I am graphing correctly. Ideally these metrics get collected with zeros on every call.
Ideally I think the ServerError and Throttling just become their own standard metrics which teams can create alarms on and it would also simplify the current approach of doing SampleCount - Sum for ApiCallSuccessful, which was the workaround proposed here #2711. Should also add ClientError to the list of possibilities.
ErrorType is not mentioned in metrics here https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/metrics-list.html implying it is a dimension, but again, those metrics won't exist unless the API's are failing.
Links
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/metrics-list.html
Beta Was this translation helpful? Give feedback.
All reactions