Search in sources :

Example 1 with SqlTrace

use of com.newrelic.agent.sql.SqlTrace in project newrelic-java-agent by newrelic.

the class RequestUriConfigTests method runSqlTest.

public void runSqlTest(RequestUriConfigSqlTest test) throws Exception {
    setupConfig(test);
    // run a transaction
    Tracer requestDispatcherTracer = startDispatcherTracer(test.getTxnName());
    long duration = 501000000;
    startSqlTracer(test.sql, duration).finish(Opcodes.RETURN, null);
    requestDispatcherTracer.finish(Opcodes.RETURN, null);
    MockRPMService mockRPMService = runHarvest();
    // verify results
    List<SqlTrace> sqlTraces = mockRPMService.getSqlTraces();
    matchUri(test.getExpectedUriValues(), sqlTraces.get(0).getUri());
}
Also used : SqlTrace(com.newrelic.agent.sql.SqlTrace) DefaultTracer(com.newrelic.agent.tracers.DefaultTracer) SqlTracer(com.newrelic.agent.tracers.SqlTracer) OtherRootSqlTracer(com.newrelic.agent.tracers.OtherRootSqlTracer) BasicRequestRootTracer(com.newrelic.agent.tracers.servlet.BasicRequestRootTracer) Tracer(com.newrelic.agent.tracers.Tracer) OtherRootTracer(com.newrelic.agent.tracers.OtherRootTracer) MockRPMService(com.newrelic.agent.MockRPMService)

Aggregations

MockRPMService (com.newrelic.agent.MockRPMService)1 SqlTrace (com.newrelic.agent.sql.SqlTrace)1 DefaultTracer (com.newrelic.agent.tracers.DefaultTracer)1 OtherRootSqlTracer (com.newrelic.agent.tracers.OtherRootSqlTracer)1 OtherRootTracer (com.newrelic.agent.tracers.OtherRootTracer)1 SqlTracer (com.newrelic.agent.tracers.SqlTracer)1 Tracer (com.newrelic.agent.tracers.Tracer)1 BasicRequestRootTracer (com.newrelic.agent.tracers.servlet.BasicRequestRootTracer)1