use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method putObject.
public CompletableFuture<PutObjectResponse> putObject(PutObjectRequest putObjectRequest, AsyncRequestBody asyncRequestBody) {
String uri = "s3://" + putObjectRequest.bucket() + "/" + putObjectRequest.key();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "putObject");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<PutObjectResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "putObject"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method deleteObject.
public CompletableFuture<DeleteObjectResponse> deleteObject(DeleteObjectRequest deleteObjectRequest) {
String uri = "s3://" + deleteObjectRequest.bucket() + "/" + deleteObjectRequest.key();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "deleteObject");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<DeleteObjectResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "deleteObject"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method listBuckets.
public CompletableFuture<ListBucketsResponse> listBuckets(ListBucketsRequest listBucketsRequest) {
String uri = "s3://amazon/";
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "listBuckets");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<ListBucketsResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "listBuckets"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method deleteBucket.
public CompletableFuture<DeleteBucketResponse> deleteBucket(DeleteBucketRequest deleteBucketRequest) {
String uri = "s3://" + deleteBucketRequest.bucket();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "deleteBucket");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<DeleteBucketResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "deleteBucket"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class AmazonSNSAsync_Instrumentation method startSegment.
private Segment startSegment(PublishRequest publishRequest, Transaction transaction) {
final Segment segment = transaction.startSegment("SNS");
MessageProduceParameters params = SNSInstrumentationHelper.makeMessageProducerParameters(publishRequest);
segment.reportAsExternal(params);
return segment;
}
Aggregations