Class ClosableTracerShim

  • All Implemented Interfaces:
    io.opentracing.Tracer, Closeable, AutoCloseable

    public class ClosableTracerShim
    extends Object
    implements io.opentracing.Tracer
    Delegate shim that forwards all calls to the actual OpenTracingShim, and in addition calls SdkTracerProvider.close() to really close the OTEL SDK tracer when the OT shim is closed.

    TODO: This can be removed once we migrate Solr instrumentation from OpenTracing to OpenTelemetry

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.opentracing.Tracer

        io.opentracing.Tracer.SpanBuilder
    • Constructor Summary

      Constructors 
      Constructor Description
      ClosableTracerShim​(io.opentracing.Tracer shim, io.opentelemetry.sdk.trace.SdkTracerProvider sdkTracerProvider)  
    • Constructor Detail

      • ClosableTracerShim

        public ClosableTracerShim​(io.opentracing.Tracer shim,
                                  io.opentelemetry.sdk.trace.SdkTracerProvider sdkTracerProvider)
    • Method Detail

      • scopeManager

        public io.opentracing.ScopeManager scopeManager()
        Specified by:
        scopeManager in interface io.opentracing.Tracer
      • activeSpan

        public io.opentracing.Span activeSpan()
        Specified by:
        activeSpan in interface io.opentracing.Tracer
      • activateSpan

        public io.opentracing.Scope activateSpan​(io.opentracing.Span span)
        Specified by:
        activateSpan in interface io.opentracing.Tracer
      • buildSpan

        public io.opentracing.Tracer.SpanBuilder buildSpan​(String operationName)
        Specified by:
        buildSpan in interface io.opentracing.Tracer
      • inject

        public <C> void inject​(io.opentracing.SpanContext spanContext,
                               io.opentracing.propagation.Format<C> format,
                               C carrier)
        Specified by:
        inject in interface io.opentracing.Tracer
      • extract

        public <C> io.opentracing.SpanContext extract​(io.opentracing.propagation.Format<C> format,
                                                      C carrier)
        Specified by:
        extract in interface io.opentracing.Tracer
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface io.opentracing.Tracer