Skip to content
Switch branches/tags
Go to file

Latest commit

Bumps [junit]( from 4.12 to 4.13.1.
- [Release notes](
- [Changelog](
- [Commits](junit-team/junit4@r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]>

Git stats


Failed to load latest commit information.

Build Status Released Version

OpenTracing Java Web Servlet Filter Instrumentation

This library provides instrumentation for Java Web Servlet applications.


Tracing filter can be programmatically initialized:

   TracingFilter filter = new TracingFilter(tracer);
   servletContext.addFilter("tracingFilter", filter);

or added to web.xml, however it requires to register a tracer instance: GlobalTracer.register(tracer).

Tracer override

If a tracer has been associated with the ServletContext as an attribute with key io.opentracing.Tracer, then it will override any tracer explicitly passed to the filter or registered with the GlobalTracer.

This approach can be used where OpenTracing and Tracer implementation specific dependencies are configured within a servlet container (rather than bundled with the webapp), and we don't wish to share a single GlobalTracer instance across all webapps (e.g. as this may mean all webapps report their spans associated with the same service name).

In these situations, using a ServletContextListener to create a Tracer will enable it to be specific to the webapp and managed with its lifecycle.

Accessing Server Span

Current server span context is accessible in HttpServletRequest attributes.

   SpanContext spanContext = (SpanContext)httpservletRequest.getAttribute(TracingFilter.SERVER_SPAN_CONTEXT);


./mvnw clean install


Follow instructions in RELEASE