Search in sources :

Example 1 with OutboundWrapper

use of com.nr.agent.instrumentation.playws.OutboundWrapper in project newrelic-java-agent by newrelic.

the class StandaloneWSClient_Instrumentation method url.

public StandaloneWSRequest_Instrumentation url(String url) {
    Segment segment = PlayWSUtils.start();
    StandaloneWSRequest_Instrumentation request = Weaver.callOriginal();
    Buffer<Tuple2<String, String>> headers = PlayWSUtils.createSeq();
    segment.addOutboundRequestHeaders(new OutboundWrapper(headers));
    request.segment = segment;
    // This is here to ensure that we always add our outbound CAT headers
    return request.addHttpHeaders(headers);
}
Also used : Tuple2(scala.Tuple2) Segment(com.newrelic.api.agent.Segment) OutboundWrapper(com.nr.agent.instrumentation.playws.OutboundWrapper)

Aggregations

Segment (com.newrelic.api.agent.Segment)1 OutboundWrapper (com.nr.agent.instrumentation.playws.OutboundWrapper)1 Tuple2 (scala.Tuple2)1