public final class TracerProvider
extends java.lang.Object
ExtendedTracer instance.
If the inspectIT agent is running with the application where TracerProvider is used, the
get methods will always returned correctly initialized ExtendedTracer.
If the inspectIT is not running, then the caller can control if the returned tracer is noop
tracer or null.
| Modifier and Type | Method and Description |
|---|---|
static ExtendedTracer |
get()
Returns the
ExtendedTracer. |
static ExtendedTracer |
get(boolean noopFallback)
Returns the
ExtendedTracer. |
static void |
set(TracerImpl tracer)
Sets
tracer. |
public static ExtendedTracer get()
ExtendedTracer. This method never returns null. If the
inspectIT is running, this method will return the correctly initialized inspectIT tracer
implementation that reports data to the inspectIT. If the inspectIT is not running with the
application this method will return the noop tracer.
Same as calling get(boolean) with true as argument.
ExtendedTracerpublic static ExtendedTracer get(boolean noopFallback)
ExtendedTracer. If the inspectIT is running, this method will return the
correctly initialized inspectIT tracer implementation that reports data to the inspectIT. If
the inspectIT is not running with the application then value of noopFailback
will be used to determine the return.noopFallback - Controls what is returned if the inspectIT tracer is not available. Passing
true will return the noop tracer, while passing false
will return null.ExtendedTracerpublic static void set(TracerImpl tracer)
tracer. Should be called only by inspectIT SDK classes.tracer - New value for tracer