Skip to content

Latest commit

 

History

History
 
 

jaeger-jaxrs2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

JAX-RS

This module provides general JAX-RS 2.0 instrumentation for a framework such as Jersey

Maven Coordinates

<dependency>
    <groupId>com.uber.jaeger</groupId>
    <artifactId>jaeger-jaxrs2</artifactId>
    <version>$jaegerVersion</version>
</dependency>

Instrumentation

This project includes instrumentation compatible with the JAX-RS 2.0 standard. Implementations such as Jersey and Dropwizard allow you to specify client and server filters to do some computational work before every request or response. These filters can then be combined into a JAX-RS Feature

You will need to add a JaegerFeature to both the server and all JAX-RS clients that you use. If you use other clients, like an Apache Http Client, make sure to instrument them as well.

Example

Final ResourceConfig rc = new ResourceConfig()
    /* Arbitrary configuration code… */
    .register(TracingUtils.serverFilter(jaegerConfig));

return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);