use of com.nr.agent.instrumentation.mule3.MuleHttpConnectorRequest in project newrelic-java-agent by newrelic.
the class HttpRequestToMuleEvent_Instrumentation method transform.
/**
* Verify the method body produces the same URI information as in module-3.6.
*/
@Trace
public static MuleEvent transform(final HttpRequestContext requestContext, final MuleContext muleContext, final FlowConstruct flowConstruct, Boolean parseRequest, ListenerPath listenerPath) {
MuleEvent event = Weaver.callOriginal();
final MuleHttpConnectorRequest muleRequest = new MuleHttpConnectorRequest(event, requestContext);
URI uri = resolveUriForNR(requestContext);
NewRelic.getAgent().getTracedMethod().reportAsExternal(HttpParameters.library("MuleHTTP").uri(uri).procedure("writeResponse").inboundHeaders(muleRequest).build());
final Transaction txn = AgentBridge.getAgent().getTransaction(false);
txn.setWebRequest(muleRequest);
final String txnName = event.getMessage().getInboundProperty("http.listener.path") + " (" + muleRequest.getMethod() + ")";
txn.setTransactionName(TransactionNamePriority.FRAMEWORK_HIGH, true, "Mule/Connector", txnName);
return event;
}
use of com.nr.agent.instrumentation.mule3.MuleHttpConnectorRequest in project newrelic-java-agent by newrelic.
the class HttpRequestToMuleEvent_Instrumentation method transform.
/**
* Verify the method body produces the same URI information as in module-3.7.
*/
@Trace
public static MuleEvent transform(final HttpRequestContext requestContext, final MuleContext muleContext, final FlowConstruct flowConstruct, Boolean parseRequest, String listenerPath) {
MuleEvent event = Weaver.callOriginal();
final MuleHttpConnectorRequest muleRequest = new MuleHttpConnectorRequest(event, requestContext);
URI uri = resolveUriForNR(requestContext);
NewRelic.getAgent().getTracedMethod().reportAsExternal(HttpParameters.library("MuleHTTP").uri(uri).procedure("writeResponse").inboundHeaders(muleRequest).build());
final Transaction txn = AgentBridge.getAgent().getTransaction(false);
txn.setWebRequest(muleRequest);
final String txnName = event.getMessage().getInboundProperty("http.listener.path") + " (" + muleRequest.getMethod() + ")";
txn.setTransactionName(TransactionNamePriority.FRAMEWORK_HIGH, true, "Mule/Connector", txnName);
return event;
}
Aggregations