Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public final class AwsSdkClientCoreStats
{
private final CounterStat awsRequestCount = new CounterStat();
private final CounterStat awsRetryCount = new CounterStat();
private final CounterStat awsHttpClientRetryCount = new CounterStat();
private final CounterStat awsThrottleExceptions = new CounterStat();
private final TimeStat awsRequestTime = new TimeStat(MILLISECONDS);
private final TimeStat awsClientExecuteTime = new TimeStat(MILLISECONDS);
Expand All @@ -66,6 +67,13 @@ public CounterStat getAwsRetryCount()
return awsRetryCount;
}

@Managed
@Nested
public CounterStat getAwsHttpClientRetryCount()
{
return awsHttpClientRetryCount;
}

@Managed
@Nested
public CounterStat getAwsThrottleExceptions()
Expand Down Expand Up @@ -134,12 +142,16 @@ public void collectMetrics(Request<?> request, Response<?> response)

Number requestCounts = timingInfo.getCounter(RequestCount.name());
if (requestCounts != null) {
stats.awsRequestCount.update(requestCounts.longValue());
long count = requestCounts.longValue();
stats.awsRequestCount.update(count);
if (count > 1) {
stats.awsRetryCount.update(count - 1);
}
}

Number retryCounts = timingInfo.getCounter(HttpClientRetryCount.name());
if (retryCounts != null) {
stats.awsRetryCount.update(retryCounts.longValue());
Number httpClientRetryCounts = timingInfo.getCounter(HttpClientRetryCount.name());
if (httpClientRetryCounts != null) {
stats.awsHttpClientRetryCount.update(httpClientRetryCounts.longValue());
}

Number throttleExceptions = timingInfo.getCounter(ThrottleException.name());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public final class AwsSdkClientCoreStats
{
private final CounterStat awsRequestCount = new CounterStat();
private final CounterStat awsRetryCount = new CounterStat();
private final CounterStat awsHttpClientRetryCount = new CounterStat();
private final CounterStat awsThrottleExceptions = new CounterStat();
private final TimeStat awsRequestTime = new TimeStat(MILLISECONDS);
private final TimeStat awsClientExecuteTime = new TimeStat(MILLISECONDS);
Expand All @@ -66,6 +67,13 @@ public CounterStat getAwsRetryCount()
return awsRetryCount;
}

@Managed
@Nested
public CounterStat getAwsHttpClientRetryCount()
{
return awsHttpClientRetryCount;
}

@Managed
@Nested
public CounterStat getAwsThrottleExceptions()
Expand Down Expand Up @@ -134,12 +142,16 @@ public void collectMetrics(Request<?> request, Response<?> response)

Number requestCounts = timingInfo.getCounter(RequestCount.name());
if (requestCounts != null) {
stats.awsRequestCount.update(requestCounts.longValue());
long count = requestCounts.longValue();
stats.awsRequestCount.update(count);
if (count > 1) {
stats.awsRetryCount.update(count - 1);
}
}

Number retryCounts = timingInfo.getCounter(HttpClientRetryCount.name());
if (retryCounts != null) {
stats.awsRetryCount.update(retryCounts.longValue());
Number httpClientRetryCounts = timingInfo.getCounter(HttpClientRetryCount.name());
if (httpClientRetryCounts != null) {
stats.awsHttpClientRetryCount.update(httpClientRetryCounts.longValue());
}

Number throttleExceptions = timingInfo.getCounter(ThrottleException.name());
Expand Down
Loading