AWS SDK for Java 2.x: Comprehensive Metrics Reference
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 duration of the API call. This includes all call attempts made. |
Duration* |
ApiCallSuccessful |
True if the API call succeeded, false otherwise. |
Boolean |
CredentialsFetchDuration |
The duration of time to fetch signing credentials for the API call. |
Duration* |
EndpointResolveDuration | The duration of time to resolve the endpoint used for the API call. | Duration* |
MarshallingDuration |
The duration of time to marshall the SDK request to an HTTP request. |
Duration* |
OperationName |
The name of the service operation being invoked. |
String |
RetryCount |
The number of retries that the SDK performed in the execution of the request. 0 implies that the request worked the first time and that no retries were attempted. For more information about configuring retry behavior, see Retry strategies. |
Integer |
ServiceId |
The unique ID for the service. |
String |
ServiceEndpoint |
The endpoint for the service. |
URI |
TokenFetchDuration |
The duration of time to fetch signing credentials for the API call. | 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 that the SDK has waited before this API call
attempt. The value is based on the |
Duration* |
ErrorType |
The type of error that occurred for a call attempt. The following are possible values:
|
String |
ReadThroughput |
The read throughput of the client, defined as
Note that this metric only measures the bytes read from within the
|
Double |
ServiceCallDuration |
The duration of time to connect to the service (or acquire a connection from the connection pool), send the serialized request and receive the initial response (for example HTTP status code and headers). This DOES NOT include the time to read the entire response from the service. |
Duration* |
SigningDuration |
The duration of time to sign the HTTP request. |
Duration* |
TimeToFirstByte | The duration of time from sending the HTTP request (including acquiring a connection) to the service, and receiving the first byte of the headers in the response. | Duration* |
TimeToLastByte |
The duration of time from sending the HTTP request (including acquiring a connection) to the service, and receiving the last byte of the response. Note that for APIs that return streaming responses, this metric spans
the time until the |
Duration* |
UnmarshallingDuration |
The duration of time to unmarshall the HTTP response to an SDK response. Note: For streaming operations, this does not include the time to read the response payload. |
Duration* |
HTTP Metrics
Metric name | Description | Type | HTTP client required* |
---|---|---|---|
AvailableConcurrency |
The number of additional concurrent requests that the HTTP client supports without establishing new connections to the target server. For HTTP/1 operations, this equals the number of idle TCP connections established with the service. For HTTP/2 operations, this equals the number of idle streams. Note: This value varies by HTTP client implementation:
The value is scoped to an individual HTTP client instance and excludes concurrency from other HTTP clients in the same JVM. |
Integer |
Apache, Netty, CRT |
ConcurrencyAcquireDuration |
The duration of time to acquire a channel from the connection pool. For HTTP/1 operations, a channel equals a TCP connection. For HTTP/2 operations, a channel equals an HTTP/2 stream channel. Acquiring a new channel may include time for:
|
Duration* |
Apache, Netty, CRT |
HttpClientName |
The name of the HTTP used for the request. |
String |
Apache, Netty, CRT |
HttpStatusCode |
The status code of the HTTP response. |
Integer |
Any |
LeasedConcurrency |
The number of requests that the HTTP client currently executes. For HTTP/1 operations, this equals the number of active TCP connections with the service (excluding idle connections). For HTTP/2 operations, this equals the number of active HTTP streams with the service (excluding idle stream capacity). Note: This value varies by HTTP client implementation:
The value is scoped to an individual HTTP client instance and excludes concurrency from other HTTP clients in the same JVM. |
Integer |
Apache, Netty, CRT |
LocalStreamWindowSize |
The local HTTP/2 window size in bytes for the stream that executes this request. |
Integer |
Netty |
MaxConcurrency |
The maximum number of concurrent requests that the HTTP client supports. For HTTP/1 operations, this equals the maximum number of TCP connections that the HTTP client can pool. For HTTP/2 operations, this equals the maximum number of streams that the HTTP client can pool. Note: This value varies by HTTP client implementation:
The value is scoped to an individual HTTP client instance and excludes concurrency from other HTTP clients in the same JVM. |
Integer |
Apache, Netty, CRT |
PendingConcurrencyAcquires |
The number of requests that wait for concurrency from the HTTP client. For HTTP/1 operations, this equals the number of requests waiting for a TCP connection to establish or return from the connection pool. For HTTP/2 operations, this equals the number of requests waiting for a new stream (and possibly a new HTTP/2 connection) from the connection pool. Note: This value varies by HTTP client implementation:
The value is scoped to an individual HTTP client instance and excludes concurrency from other HTTP clients in the same JVM. |
Integer |
Apache, Netty, CRT |
RemoteStreamWindowSize |
The remote HTTP/2 window size in bytes for the stream that executes this request. |
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
)