use of com.agent.instrumentation.akka.http.ResponseWrapper in project newrelic-java-agent by newrelic.
the class AkkaHttpMarshallerMapper method apply.
@Override
@Trace(async = true)
public HttpResponse apply(HttpResponse httpResponse) {
try {
if (token != null) {
token.linkAndExpire();
}
ResponseWrapper responseWrapper = new ResponseWrapper(httpResponse);
Transaction transaction = NewRelic.getAgent().getTransaction();
transaction.setWebResponse(responseWrapper);
transaction.addOutboundResponseHeaders();
transaction.markResponseSent();
return responseWrapper.response();
} catch (Throwable t) {
AgentBridge.instrumentation.noticeInstrumentationError(t, Weaver.getImplementationTitle());
return httpResponse;
}
}
Aggregations