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)
.
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