Skip to content

Commit

Permalink
aws-*: do not hide http request
Browse files Browse the repository at this point in the history
  • Loading branch information
meiao committed Jan 15, 2025
1 parent aa608ee commit 13b3737
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,99 +68,99 @@ public AmazonDynamoDBClient_Instrumentation(ClientConfiguration clientConfigurat

private final AWSCredentialsProvider awsCredentialsProvider = Weaver.callOriginal();

@Trace(async = true, leaf = true)
@Trace(async = true)
final CreateTableResult executeCreateTable(CreateTableRequest createTableRequest) {
linkAndExpire(createTableRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "createTable",
createTableRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final BatchGetItemResult executeBatchGetItem(BatchGetItemRequest batchGetItemRequest) {
linkAndExpire(batchGetItemRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "batchGetItem", "batch", endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final BatchWriteItemResult executeBatchWriteItem(BatchWriteItemRequest batchWriteItemRequest) {
linkAndExpire(batchWriteItemRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "batchWriteItem", "batch", endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final DeleteItemResult executeDeleteItem(DeleteItemRequest deleteItemRequest) {
linkAndExpire(deleteItemRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "deleteItem",
deleteItemRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final DeleteTableResult executeDeleteTable(DeleteTableRequest deleteTableRequest) {
linkAndExpire(deleteTableRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "deleteTable",
deleteTableRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final DescribeLimitsResult executeDescribeLimits(DescribeLimitsRequest describeLimitsRequest) {
linkAndExpire(describeLimitsRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "describeLimits", null, endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final DescribeTableResult executeDescribeTable(DescribeTableRequest describeTableRequest) {
linkAndExpire(describeTableRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "describeTable",
describeTableRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final DescribeTimeToLiveResult executeDescribeTimeToLive(DescribeTimeToLiveRequest describeTimeToLiveRequest) {
linkAndExpire(describeTimeToLiveRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "describeTimeToLive",
describeTimeToLiveRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final GetItemResult executeGetItem(GetItemRequest getItemRequest) {
linkAndExpire(getItemRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "getItem", getItemRequest.getTableName(),
endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final ListTablesResult executeListTables(ListTablesRequest listTablesRequest) {
linkAndExpire(listTablesRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "listTables",
listTablesRequest.getExclusiveStartTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final ListTagsOfResourceResult executeListTagsOfResource(ListTagsOfResourceRequest listTagsOfResourceRequest) {
linkAndExpire(listTagsOfResourceRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "listTagsOfResource", null, endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final PutItemResult executePutItem(PutItemRequest putItemRequest) {
linkAndExpire(putItemRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "putItem", putItemRequest.getTableName(),
endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final QueryResult executeQuery(QueryRequest queryRequest) {
linkAndExpire(queryRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "query", queryRequest.getTableName(),
Expand All @@ -169,44 +169,44 @@ final QueryResult executeQuery(QueryRequest queryRequest) {

}

@Trace(async = true, leaf = true)
@Trace(async = true)
final ScanResult executeScan(ScanRequest scanRequest) {
linkAndExpire(scanRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "scan", scanRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {
linkAndExpire(tagResourceRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "tagResource", null, endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {
linkAndExpire(untagResourceRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "untagResource", null, endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final UpdateItemResult executeUpdateItem(UpdateItemRequest updateItemRequest) {
linkAndExpire(updateItemRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "updateItem",
updateItemRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final UpdateTableResult executeUpdateTable(UpdateTableRequest updateTableRequest) {
linkAndExpire(updateTableRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "updateTable",
updateTableRequest.getTableName(), endpoint, this, awsCredentialsProvider);
return Weaver.callOriginal();
}

@Trace(async = true, leaf = true)
@Trace(async = true)
final UpdateTimeToLiveResult executeUpdateTimeToLive(UpdateTimeToLiveRequest updateTimeToLiveRequest) {
linkAndExpire(updateTimeToLiveRequest);
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "updateTimeToLive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,117 +22,117 @@ final class DefaultDynamoDbAsyncClient_Instrumentation {

private final SdkClientConfiguration clientConfiguration = Weaver.callOriginal();

@Trace(leaf = true)
@Trace
public CompletableFuture<ScanResponse> scan(ScanRequest scanRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "scan", scanRequest.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<PutItemResponse> putItem(PutItemRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "putItem", request.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<GetItemResponse> getItem(GetItemRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "getItem", request.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<DeleteItemResponse> deleteItem(DeleteItemRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "deleteItem", request.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<ListTablesResponse> listTables(ListTablesRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "listTables", request.exclusiveStartTableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<DescribeTableResponse> describeTable(DescribeTableRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "describeTable", request.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<CreateTableResponse> createTable(CreateTableRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "createTable", request.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<DeleteTableResponse> deleteTable(DeleteTableRequest request) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "deleteTable", request.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<BatchGetItemResponse> batchGetItem(BatchGetItemRequest batchGetItemRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "batchGetItem", "batch", this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<BatchWriteItemResponse> batchWriteItem(BatchWriteItemRequest batchWriteItemRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "batchWriteItem", "batch", this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<ListTagsOfResourceResponse> listTagsOfResource(ListTagsOfResourceRequest listTagsOfResourceRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "listTagsOfResource", listTagsOfResourceRequest.resourceArn(), this,
clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<QueryResponse> query(QueryRequest queryRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "query", queryRequest.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}


@Trace(leaf = true)
@Trace
public CompletableFuture<UpdateItemResponse> updateItem(UpdateItemRequest updateItemRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "updateItem", updateItemRequest.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<UpdateTableResponse> updateTable(UpdateTableRequest updateTableRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "updateTable", updateTableRequest.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<UpdateTimeToLiveResponse> updateTimeToLive(UpdateTimeToLiveRequest updateTimeToLiveRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "updateTimeToLive", updateTimeToLiveRequest.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<DescribeLimitsResponse> describeLimits(DescribeLimitsRequest describeLimitsRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "describeLimits", null, this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "untagResource", untagResourceRequest.resourceArn(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "tagResource", tagResourceRequest.resourceArn(), this, clientConfiguration);
return Weaver.callOriginal();
}

@Trace(leaf = true)
@Trace
public CompletableFuture<DescribeTimeToLiveResponse> describeTimeToLive(DescribeTimeToLiveRequest describeTimeToLiveRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "describeTimeToLive", describeTimeToLiveRequest.tableName(), this, clientConfiguration);
return Weaver.callOriginal();
Expand Down
Loading

0 comments on commit 13b3737

Please sign in to comment.