Class OpenTracingTracerFactory
- java.lang.Object
-
- org.apache.qpid.jms.tracing.JmsTracerFactory
-
- org.apache.qpid.jms.tracing.opentracing.OpenTracingTracerFactory
-
public class OpenTracingTracerFactory extends JmsTracerFactory
-
-
Constructor Summary
Constructors Constructor Description OpenTracingTracerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JmsTracercreate(io.opentracing.Tracer tracer)Creates a JmsTracer wrapping a provided Open Tracing tracer instance previously created by the application.static JmsTracercreate(io.opentracing.Tracer tracer, boolean closeUnderlyingTracer)Ascreate(Tracer), but providing control over whether the given Tracer has its close method called when the returned JmsTracer is closed duringConnection.close().JmsTracercreateTracer(URI remoteURI, String name)-
Methods inherited from class org.apache.qpid.jms.tracing.JmsTracerFactory
create, findTracerFactory
-
-
-
-
Method Detail
-
create
public static JmsTracer create(io.opentracing.Tracer tracer)
Creates a JmsTracer wrapping a provided Open Tracing tracer instance previously created by the application. Used for programmatic creation of JmsTracer to explicitly set on a ConnectionFactory when not using the jms.tracing URI option, orJmsConnectionFactory.setTracing(String), which both utilise theGlobalTracer. The returned JmsTracer will no-op when its close method is called duringConnection.close()closure, to allow using the given Tracer with multiple connections and elsewhere in the application. Equivalent to calling#create(Tracer, false)- Parameters:
tracer- The Open Tracing tracer to use- Returns:
- a JmsTracer instance using the provided OpenTracing tracer.
-
create
public static JmsTracer create(io.opentracing.Tracer tracer, boolean closeUnderlyingTracer)
Ascreate(Tracer), but providing control over whether the given Tracer has its close method called when the returned JmsTracer is closed duringConnection.close().- Parameters:
tracer- The Open Tracing tracer to usecloseUnderlyingTracer- Whether to close the underlying tracer duringConnection.close()- Returns:
- a JmsTracer instance using the provided OpenTracing tracer.
-
createTracer
public JmsTracer createTracer(URI remoteURI, String name) throws Exception
- Specified by:
createTracerin classJmsTracerFactory- Throws:
Exception
-
-