use of com.newrelic.agent.tracers.servlet.MockHttpRequest in project newrelic-java-agent by newrelic.
the class JsonTracer method generateRootWebTracer.
private DefaultTracer generateRootWebTracer(Long initTime) {
DefaultTracer tracer = generateRootBackgroundTracer(initTime);
Transaction.getTransaction().setWebRequest(new MockHttpRequest());
Transaction.getTransaction().setWebResponse(new MockHttpResponse());
return tracer;
}
use of com.newrelic.agent.tracers.servlet.MockHttpRequest in project newrelic-java-agent by newrelic.
the class AbstractPriorityTransactionNamingPolicyTest method startWebTransaction.
private void startWebTransaction() throws Exception {
Transaction tx = Transaction.getTransaction();
MockHttpRequest httpRequest = new MockHttpRequest();
httpRequest.setRequestURI("");
MockHttpResponse httpResponse = new MockHttpResponse();
ClassMethodSignature sig = new ClassMethodSignature(getClass().getName(), "dude", "()V");
Tracer tracer = new BasicRequestRootTracer(tx, sig, this, httpRequest, httpResponse);
tx.getTransactionActivity().tracerStarted(tracer);
}
Aggregations