public class BraveTracing extends Object implements Tracing
Tracing
integration with OpenZipkin's Brave Tracer
. This implementation creates Brave
Span
s that are optionally associated with a TraceContext
.
TraceContext
PropagationTracer.Span
to trace the actual command. A parent Span
is picked up for
imperative (synchronous/asynchronous) API usage from Tracing.currentTracer()
. The context is not propagated
across asynchronous call chains resulting from CompletionStage
chaining.
Reactive API usage leverages Reactor's Context
so that subscribers can register one of the
following objects (using their Class
as context key):
TraceContextProvider
Span
: Commands extract the TraceContext
TraceContext
Span
.Tracer
,
Tracing.currentTracer()
,
BraveTraceContextProvider
Modifier and Type | Class and Description |
---|---|
static class |
BraveTracing.BraveEndpoint
Endpoint implementation for Zipkin's Endpoint . |
static class |
BraveTracing.BraveTraceContext
TraceContext implementation for Brave's TraceContext . |
Tracing.Endpoint
Modifier and Type | Method and Description |
---|---|
static BraveTracing |
create(brave.Tracing tracing)
Create a new
BraveTracing instance. |
Tracing.Endpoint |
createEndpoint(SocketAddress socketAddress)
Create an
Tracing.Endpoint given SocketAddress . |
TracerProvider |
getTracerProvider() |
TraceContextProvider |
initialTraceContextProvider() |
boolean |
isEnabled()
Returns true if tracing is enabled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearContext, disabled, getContext, withTraceContextProvider
public static BraveTracing create(brave.Tracing tracing)
BraveTracing
instance.tracing
- must not be null.BraveTracing
.public boolean isEnabled()
Tracing
public TracerProvider getTracerProvider()
getTracerProvider
in interface Tracing
TracerProvider
.public TraceContextProvider initialTraceContextProvider()
initialTraceContextProvider
in interface Tracing
TraceContextProvider
supplying the initial TraceContext
(i.e. if there is no active span).public Tracing.Endpoint createEndpoint(SocketAddress socketAddress)
Tracing
Tracing.Endpoint
given SocketAddress
.createEndpoint
in interface Tracing
socketAddress
- the remote address.Tracing.Endpoint
for SocketAddress
.Copyright © 2019 lettuce.io. All rights reserved.