Search in sources :

Example 31 with Segment

use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.

the class WSRequest_Instrumentation method patch.

public CompletionStage<WSResponse> patch(JsonNode body) {
    Segment currentSegment = StandaloneWSRequest_Instrumentation.class.cast(this).segment;
    CompletionStage<WSResponse> responseFuture = Weaver.callOriginal();
    responseFuture = tryRecordExternalRequest("patch", responseFuture, currentSegment);
    return responseFuture;
}
Also used : Segment(com.newrelic.api.agent.Segment)

Example 32 with Segment

use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.

the class WSRequest_Instrumentation method post.

public CompletionStage<WSResponse> post(JsonNode body) {
    Segment currentSegment = StandaloneWSRequest_Instrumentation.class.cast(this).segment;
    CompletionStage<WSResponse> responseFuture = Weaver.callOriginal();
    responseFuture = tryRecordExternalRequest("post", responseFuture, currentSegment);
    return responseFuture;
}
Also used : Segment(com.newrelic.api.agent.Segment)

Example 33 with Segment

use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.

the class WSRequest_Instrumentation method setBody.

public WSRequest_Instrumentation setBody(InputStream body) {
    Segment currentSegment = StandaloneWSRequest_Instrumentation.class.cast(this).segment;
    StandaloneWSRequest_Instrumentation.class.cast(this).segment = null;
    WSRequest_Instrumentation result = Weaver.callOriginal();
    StandaloneWSRequest_Instrumentation.class.cast(result).segment = currentSegment;
    return result;
}
Also used : Segment(com.newrelic.api.agent.Segment)

Example 34 with Segment

use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.

the class WSRequest_Instrumentation method post.

public CompletionStage<WSResponse> post(String body) {
    Segment currentSegment = StandaloneWSRequest_Instrumentation.class.cast(this).segment;
    CompletionStage<WSResponse> responseFuture = Weaver.callOriginal();
    responseFuture = tryRecordExternalRequest("post", responseFuture, currentSegment);
    return responseFuture;
}
Also used : Segment(com.newrelic.api.agent.Segment)

Example 35 with Segment

use of com.newrelic.api.agent.Segment in project newrelic-java-agent by newrelic.

the class WSRequest_Instrumentation method patch.

public CompletionStage<WSResponse> patch(Document body) {
    Segment currentSegment = StandaloneWSRequest_Instrumentation.class.cast(this).segment;
    CompletionStage<WSResponse> responseFuture = Weaver.callOriginal();
    responseFuture = tryRecordExternalRequest("patch", responseFuture, currentSegment);
    return responseFuture;
}
Also used : Segment(com.newrelic.api.agent.Segment)

Aggregations

Segment (com.newrelic.api.agent.Segment)138 Trace (com.newrelic.api.agent.Trace)13 URI (java.net.URI)6 NoOpSegment (com.newrelic.agent.bridge.NoOpSegment)5 URISyntaxException (java.net.URISyntaxException)4 HttpResponse (akka.http.scaladsl.model.HttpResponse)3 Transaction (com.newrelic.agent.bridge.Transaction)3 DatastoreParameters (com.newrelic.api.agent.DatastoreParameters)3 ExternalParameters (com.newrelic.api.agent.ExternalParameters)3 InetSocketAddress (java.net.InetSocketAddress)3 Test (org.junit.Test)3 Transaction (com.newrelic.agent.Transaction)2 MessageProduceParameters (com.newrelic.api.agent.MessageProduceParameters)2 Transaction (com.newrelic.api.agent.Transaction)2 OutboundWrapper (com.nr.agent.instrumentation.asynchttpclient.OutboundWrapper)2 HelloReply (io.grpc.examples.helloworld.HelloReply)2 HelloRequest (io.grpc.examples.helloworld.HelloRequest)2 IOException (java.io.IOException)2 SocketAddress (java.net.SocketAddress)2 MemcachedNode (net.spy.memcached.MemcachedNode)2