Class OpenTracingTracerProvider

java.lang.Object
io.helidon.tracing.opentracing.OpenTracingTracerProvider
All Implemented Interfaces:
TracerProvider

@Priority(7000) public class OpenTracingTracerProvider extends Object implements TracerProvider
ServiceLoader service implementation of TracerProvider for Open Tracing tracers.
  • Constructor Details

    • OpenTracingTracerProvider

      public OpenTracingTracerProvider()
  • Method Details

    • createBuilder

      public TracerBuilder<?> createBuilder()
      Description copied from interface: TracerProvider
      Create a new builder for this tracer.
      Specified by:
      createBuilder in interface TracerProvider
      Returns:
      a tracer builder
    • global

      public Tracer global()
      Description copied from interface: TracerProvider
      Global tracer that is registered, or a NoOp tracer if none is registered.
      Specified by:
      global in interface TracerProvider
      Returns:
      current global tracer
    • global

      public void global(Tracer tracer)
      Description copied from interface: TracerProvider
      Register a global tracer instance. This method should not fail except for the case that tracer is null - if the tracer cannot be registered, silently ignore it.
      Specified by:
      global in interface TracerProvider
      Parameters:
      tracer - tracer to register as global
    • currentSpan

      public Optional<Span> currentSpan()
      Description copied from interface: TracerProvider
      Provide current span.
      Specified by:
      currentSpan in interface TracerProvider
      Returns:
      current span, or empty optional if current span cannot be found
    • available

      public boolean available()
      Description copied from interface: TracerProvider
      Whether there is a tracer available by this provider. This allows co-existence of multiple tracing providers within the same VM.
      Specified by:
      available in interface TracerProvider
      Returns:
      whether this tracer provider has a tracer available