Interface TracerConverter


  • public interface TracerConverter
    Function converting an existing Tracer.

    This can be useful for wrapping tracers:

     
     public final class FooWrapperConverter implements TracerConverter {
         public Tracer convert(Tracer existingTracer) {
             return new FooTracerWrapper(existingTracer);
         }
     }
     
     

    If there are multiple TracerConverter implementations resolved, they will be applied in the order of their @Priority annotation:

    1. First, non-negative priority is applied in natural order (e.g. 0, 1, 2, ...).
    2. Next, objects without @Priority annotation are applied by assigning a default priority of Integer.MAX_VALUE.
    3. Finally, negative priority is applied in reverse-natural order (e.g. -1, -2, -3, ...).

    The order of objects with equal (implicit) priority is undefined.

    Author:
    Sjoerd Talsma
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.opentracing.Tracer convert​(io.opentracing.Tracer existingTracer)
      Function that converts a Tracer.
    • Method Detail

      • convert

        io.opentracing.Tracer convert​(io.opentracing.Tracer existingTracer)
        Function that converts a Tracer.

        It may either manipulate the tracer or return an entirely new Tracer instance.

        Parameters:
        existingTracer - The existing tracer to be converted.
        Returns:
        The converted tracer.