Package fish.payara.opentracing.tracer
Class Tracer
- java.lang.Object
-
- fish.payara.opentracing.tracer.Tracer
-
- All Implemented Interfaces:
io.opentracing.Tracer,Closeable,AutoCloseable
public class Tracer extends Object implements io.opentracing.Tracer
Implementation of the OpenTracing Tracer class.- Author:
- Andrew Pielage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTracer.SpanBuilderImplementation of the OpenTracing SpanBuilder class.
-
Constructor Summary
Constructors Constructor Description Tracer(String applicationName, RequestTracingService requestTracingService)Constructor that registers this Tracer to an application using a thread-local ScopeManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.opentracing.ScopeactivateSpan(io.opentracing.Span span)io.opentracing.SpanactiveSpan()Tracer.SpanBuilderbuildSpan(String operationName)voidclose()<C> io.opentracing.SpanContextextract(io.opentracing.propagation.Format<C> format, C carrier)<C> voidinject(io.opentracing.SpanContext spanContext, io.opentracing.propagation.Format<C> format, C carrier)io.opentracing.ScopeManagerscopeManager()
-
-
-
Constructor Detail
-
Tracer
public Tracer(String applicationName, RequestTracingService requestTracingService)
Constructor that registers this Tracer to an application using a thread-local ScopeManager- Parameters:
applicationName- The application to register this tracer to
-
-
Method Detail
-
buildSpan
public Tracer.SpanBuilder buildSpan(String operationName)
- Specified by:
buildSpanin interfaceio.opentracing.Tracer
-
inject
public <C> void inject(io.opentracing.SpanContext spanContext, io.opentracing.propagation.Format<C> format, C carrier)- Specified by:
injectin interfaceio.opentracing.Tracer
-
extract
public <C> io.opentracing.SpanContext extract(io.opentracing.propagation.Format<C> format, C carrier)- Specified by:
extractin interfaceio.opentracing.Tracer
-
scopeManager
public io.opentracing.ScopeManager scopeManager()
- Specified by:
scopeManagerin interfaceio.opentracing.Tracer
-
activeSpan
public io.opentracing.Span activeSpan()
- Specified by:
activeSpanin interfaceio.opentracing.Tracer
-
activateSpan
public io.opentracing.Scope activateSpan(io.opentracing.Span span)
- Specified by:
activateSpanin interfaceio.opentracing.Tracer
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceio.opentracing.Tracer
-
-