public class JaegerConfig
extends java.lang.Object
| Constructor and Description |
|---|
JaegerConfig() |
| Modifier and Type | Method and Description |
|---|---|
static io.opentracing.Scope |
activate(io.opentracing.Span span)
Make a
Span instance active for the current context (usually a thread). |
static io.opentracing.Span |
activeSpan() |
static io.opentracing.Tracer.SpanBuilder |
buildSpan(java.lang.Class spanClass)
Builds a span with the current class as the operation name.
|
static io.opentracing.Tracer.SpanBuilder |
buildSpan(java.lang.String operationName)
Builds a span with the operation name
|
static io.opentracing.Tracer.SpanBuilder |
buildSpanFromMethod(java.lang.Object enclosed)
Builds a span with the current class and method name.
|
static io.opentracing.Tracer.SpanBuilder |
buildSpanFromMethod(java.lang.Object enclosed,
io.opentracing.Span parentSpan)
Builds a child span with the current class and method name
|
static boolean |
enabled()
Returns true when tracing is configured
to report spans vs just producing a noop.
|
static io.opentracing.Tracer |
getTracer()
Returns the currently configured tracer
|
static io.opentracing.Tracer |
init(java.lang.String service)
Initialize a tracer
|
public static io.opentracing.Tracer getTracer()
public static boolean enabled()
public static io.opentracing.Scope activate(io.opentracing.Span span)
Span instance active for the current context (usually a thread).
This is a shorthand for Tracer.scopeManager().activate(span).span - the built spanScope instance to control the end of the active period for the Span.public static io.opentracing.Span activeSpan()
Span. This is a shorthand for Tracer.scopeManager().activeSpan()public static io.opentracing.Tracer.SpanBuilder buildSpanFromMethod(java.lang.Object enclosed,
io.opentracing.Span parentSpan)
enclosed - a type created in the current method scopeparentSpan - parent span of the built spanpublic static io.opentracing.Tracer.SpanBuilder buildSpan(java.lang.String operationName)
operationName - span operation namepublic static io.opentracing.Tracer.SpanBuilder buildSpan(java.lang.Class spanClass)
JaegerConfig.buildFromMethod(new Object(){})spanClass - used to set the operation name.public static io.opentracing.Tracer.SpanBuilder buildSpanFromMethod(java.lang.Object enclosed)
JaegerConfig.buildFromMethod(new Object(){})enclosed - a type created in the current method scopepublic static io.opentracing.Tracer init(java.lang.String service)
service - a service name