Service client metrics
With the AWS SDK for Java 2.x, you can collect metrics from the service clients in your application and then publish (output) those metrics to Amazon CloudWatch.
These tables list the metrics that you can collect and any HTTP client usage requirement.
For more information about enabling and configuring metrics for the SDK, see Enabling SDK metrics.
Metrics collected with each request
Metric name | Description | Type |
---|---|---|
ApiCallDuration |
The total time taken to finish a request (inclusive of all retries). |
Duration* |
ApiCallSuccessful |
True if the API call was successful; false if not. |
Boolean |
CredentialsFetchDuration |
The time taken to fetch AWS signing credentials for the request. |
Duration* |
EndpointResolveDuration | The duration of time it took to resolve the endpoint used for the API call. | Duration* |
MarshallingDuration |
The time it takes to marshall an SDK request to an HTTP request. |
Duration* |
OperationName |
The name of the AWS API the request is made to. |
String |
RetryCount |
Number of times the SDK retried the API call. |
Integer |
ServiceId |
Service ID of the AWS service that the API request is made against. |
String |
TokenFetchDuration |
The time taken to fetch token signing credentials for the request. | Duration* |
Metrics collected for each request attempt
Each API call might require multiple attempts before a response is received. These metrics are collected for each attempt.
Core metrics
Metric name | Description | Type |
---|---|---|
AwsExtendedRequestId |
The extended request ID of the service request. |
String |
AwsRequestId |
The request ID of the service request. |
String |
BackoffDelayDuration |
The duration of time the SDK waited before this API call attempt. |
Duration* |
ErrorType | The type of error that occurred for a call attempt. | String |
ReadThroughput | The read throughput of the client in bytes/second. | Double |
ServiceCallDuration |
The time it takes to connect to the service, send the request, and receive the HTTP status code and header from the response. |
Duration* |
SigningDuration |
The time it takes to sign the HTTP request. |
Duration* |
TimeToFirstByte | Elapsed time from sending the HTTP request (including acquiring a connection) to receiving the first byte of the headers in the response. | Duration* |
TimeToLastByte | Elapsed time from sending the HTTP request (including acquiring a connection) to receiving the last byte of the response. | Duration* |
UnmarshallingDuration |
The time it takes to unmarshall an HTTP response to an SDK response. |
Duration* |
HTTP Metrics
Metric name | Description | Type | HTTP client required* |
---|---|---|---|
AvailableConcurrency |
The number of remaining concurrent requests that can be supported by the HTTP client without needing to establish another connection. |
Integer |
Apache, Netty, CRT |
ConcurrencyAcquireDuration |
The time taken to acquire a channel from the connection pool. |
Duration* |
Apache, Netty, CRT |
HttpClientName |
The name of the HTTP being use for the request. |
String |
Apache, Netty, CRT |
HttpStatusCode |
The status code returned with the HTTP response. |
Integer |
Any |
LeasedConcurrency |
The number of request currently being executed by the HTTP client. |
Integer |
Apache, Netty, CRT |
LocalStreamWindowSize |
The local HTTP/2 window size in bytes for the stream that this request was executed on. |
Integer |
Netty |
MaxConcurrency |
The max number of concurrent requests supported by the HTTP client. |
Integer |
Apache, Netty, CRT |
PendingConcurrencyAcquires |
The number of requests that are blocked, waiting for another TCP connection or a new stream to be available from the connection pool. |
Integer |
Apache, Netty, CRT |
RemoteStreamWindowSize |
The remote HTTP/2 window size in bytes for the stream that this request was executed on. |
Integer |
Netty |
The terms used in the column mean:
-
Apache: the Apache-based HTTP client (
ApacheHttpClient
) -
Netty: the Netty-based HTTP client (
NettyNioAsyncHttpClient
) -
CRT: the AWS CRT-based HTTP client (
AwsCrtAsyncHttpClient
) -
Any: the collection of metric data does not depend on the HTTP client; this includes the URLConnection-based HTTP client (
UrlConnectionHttpClient
)