Search in sources :

Example 1 with ApmFilter

use of co.elastic.apm.servlet.ApmFilter in project apm-agent-java by elastic.

the class ApmHandlerInterceptorTest method setup.

@BeforeEach
void setup() {
    final ElasticApmTracer tracer = ElasticApmTracer.builder().configurationRegistry(SpyConfiguration.createSpyConfig()).build();
    this.mockMvc = MockMvcBuilders.standaloneSetup(new TestController(tracer)).addFilters(new ApmFilter(tracer)).addInterceptors(new ApmHandlerInterceptor(tracer)).build();
}
Also used : ElasticApmTracer(co.elastic.apm.impl.ElasticApmTracer) ApmFilter(co.elastic.apm.servlet.ApmFilter) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ElasticApmTracer (co.elastic.apm.impl.ElasticApmTracer)1 ApmFilter (co.elastic.apm.servlet.ApmFilter)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1