public abstract class TracerResolver extends Object
TracerResolver API definition looks for one or more registered TracerResolver implementations
using the ServiceLoader.
If no TracerResolver implementations are found, the resolveTracer() method will fallback to
ServiceLoader lookup of the Tracer service itself.
Available TracerConverter implementations are applied to the resolved Tracer instance.
None of this happens if there is an existing GlobalTracer explicit registration.
That will always be returned (as-is) by the resolver, if available.
| Constructor and Description |
|---|
TracerResolver() |
| Modifier and Type | Method and Description |
|---|---|
static void |
reload()
Deprecated.
This method is now no-op. It's safe to just remove this method call, as there's no caching anymore.
|
protected abstract io.opentracing.Tracer |
resolve()
Deprecated.
Tracers are encouraged to use the
TracerFactory interface to provide tracers |
static io.opentracing.Tracer |
resolveTracer()
Attempts to resolve a Tracer via
ServiceLoader using a variety of mechanisms, from the most recommended
to the least recommended: |
static io.opentracing.Tracer |
resolveTracer(ClassLoader classloader)
Attempts to resolve a Tracer via
ServiceLoader using a variety of mechanisms, from the most recommended
to the least recommended: |
@Deprecated protected abstract io.opentracing.Tracer resolve()
TracerFactory interface to provide tracersTracer implementation.null if none was resolved.public static io.opentracing.Tracer resolveTracer()
ServiceLoader using a variety of mechanisms, from the most recommended
to the least recommended:
TracerFactoryTracerResolverTracerWhenever a Tracer can be resolved by any of the methods above, the resolution stops. It means that if a Factory is found, no Resolvers are attempted to be loaded.
If a GlobalTracer has been previously registered, it will be returned before attempting to resolve
a Tracer on our own.
If more than one TracerFactory or TracerResolver is found, the one with the highest priority is
returned. Note that if a TracerResolver has a higher priority than all available TracerFactory,
the factory still wins.
null if none was resolved.public static io.opentracing.Tracer resolveTracer(ClassLoader classloader)
ServiceLoader using a variety of mechanisms, from the most recommended
to the least recommended:
TracerFactoryTracerResolverTracerWhenever a Tracer can be resolved by any of the methods above, the resolution stops. It means that if a Factory is found, no Resolvers are attempted to be loaded.
If a GlobalTracer has been previously registered, it will be returned before attempting to resolve
a Tracer on our own.
If more than one TracerFactory or TracerResolver is found, the one with the highest priority is
returned. Note that if a TracerResolver has a higher priority than all available TracerFactory,
the factory still wins.
classloader - The class loader to be used to load provider-configuration files
and provider classes, or null if the thread context class loader to be used.null if none was resolved.@Deprecated public static void reload()
Copyright © 2017–2019. All rights reserved.