use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method getObject.
public <ReturnT> CompletableFuture<ReturnT> getObject(GetObjectRequest getObjectRequest, AsyncResponseTransformer asyncResponseTransformer) {
String uri = "s3://" + getObjectRequest.bucket() + "/" + getObjectRequest.key();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "getObject");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<ReturnT> result = Weaver.callOriginal();
return result.whenComplete(new ResultWrapper<>(segment));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method listObjects.
public CompletableFuture<ListObjectsResponse> listObjects(ListObjectsRequest listObjectsRequest) {
String uri = "s3://" + listObjectsRequest.bucket();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "listObjects");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<ListObjectsResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "listObjects"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method getBucketLocation.
public CompletableFuture<GetBucketLocationResponse> getBucketLocation(GetBucketLocationRequest getBucketLocationRequest) {
String uri = "s3://" + getBucketLocationRequest.bucket();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "getBucketLocation");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<GetBucketLocationResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "getBucketLocation"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class S3AsyncClient_Instrumentation method deleteObjects.
public CompletableFuture<DeleteObjectsResponse> deleteObjects(DeleteObjectsRequest deleteObjectsRequest) {
String uri = "s3://" + deleteObjectsRequest.bucket();
Segment segment = NewRelic.getAgent().getTransaction().startSegment("S3", "deleteObjects");
AgentBridge.getAgent().getTracedMethod().setTrackChildThreads(false);
CompletableFuture<DeleteObjectsResponse> result = Weaver.callOriginal();
return result.whenComplete(new S3ResponseResultWrapper<>(segment, uri, "deleteObjects"));
}
use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.
the class HttpExtInstrumentation method singleRequest.
public Future<HttpResponse> singleRequest(HttpRequest httpRequest, HttpsConnectionContext connectionContext, ConnectionPoolSettings poolSettings, LoggingAdapter loggingAdapter) {
final Segment segment = NewRelic.getAgent().getTransaction().startSegment("Akka", "singleRequest");
Future<HttpResponse> responseFuture = Weaver.callOriginal();
AkkaHttpUtils.finishSegmentOnComplete(httpRequest, responseFuture, segment);
return responseFuture;
}
Aggregations