Class ServerTracingDynamicFeature

  • All Implemented Interfaces:
    jakarta.ws.rs.container.DynamicFeature

    public class ServerTracingDynamicFeature
    extends Object
    implements jakarta.ws.rs.container.DynamicFeature
    This class has to be registered as JAX-RS provider to enable tracing of server requests. It also requires SpanFinishingFilter for correct functionality. Spans are created in JAX-RS filter and finished in servlet filter.
    Author:
    Pavol Loffay
    • Constructor Detail

      • ServerTracingDynamicFeature

        public ServerTracingDynamicFeature()
        When using this constructor application has to call GlobalTracer.register(io.opentracing.Tracer) to register tracer instance. Ideally it should be called in ServletContextListener. For a custom configuration use ServerTracingDynamicFeature.Builder.build().
    • Method Detail

      • configure

        public void configure​(jakarta.ws.rs.container.ResourceInfo resourceInfo,
                              jakarta.ws.rs.core.FeatureContext context)
        Specified by:
        configure in interface jakarta.ws.rs.container.DynamicFeature
      • closestTracedAnnotation

        protected org.eclipse.microprofile.opentracing.Traced closestTracedAnnotation​(jakarta.ws.rs.container.ResourceInfo resourceInfo)
      • tracingDisabled

        protected boolean tracingDisabled​(jakarta.ws.rs.container.ResourceInfo resourceInfo)
      • operationName

        protected String operationName​(jakarta.ws.rs.container.ResourceInfo resourceInfo)