use of co.elastic.apm.MockReporter in project apm-agent-java by elastic.
the class ApmJdbcEventListenerTest method setUp.
@BeforeEach
void setUp() throws SQLException {
ElasticApmTracer tracer = ElasticApmTracer.builder().configurationRegistry(SpyConfiguration.createSpyConfig()).reporter(new MockReporter()).build().register();
connection = DriverManager.getConnection("jdbc:p6spy:h2:mem:test", "user", "");
connection.createStatement().execute("CREATE TABLE IF NOT EXISTS ELASTIC_APM (FOO INT, BAR VARCHAR(255))");
connection.createStatement().execute("INSERT INTO ELASTIC_APM (FOO, BAR) VALUES (1, 'APM')");
transaction = tracer.startTransaction();
}
use of co.elastic.apm.MockReporter in project apm-agent-java by elastic.
the class ApmFilterTest method setUp.
@BeforeEach
void setUp() {
reporter = new MockReporter();
config = SpyConfiguration.createSpyConfig();
ElasticApmTracer tracer = ElasticApmTracer.builder().configurationRegistry(config).reporter(reporter).build();
apmFilter = new ApmFilter(tracer);
}
Aggregations