public class BraveTracing extends Object implements Tracing
Tracing integration with OpenZipkin's Brave Tracer. This implementation creates Brave
Spans 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):
TraceContextProviderSpan: Commands extract the TraceContextTraceContextSpan.Tracer,
Tracing.currentTracer(),
BraveTraceContextProvider,
builder()| 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. |
static class |
BraveTracing.Builder
Builder for
BraveTracing. |
Tracing.Endpoint| Modifier and Type | Method and Description |
|---|---|
static BraveTracing.Builder |
builder()
Create a new
BraveTracing.Builder to build BraveTracing. |
static BraveTracing |
create(brave.Tracing tracing)
Create a new
BraveTracing instance. |
Tracing.Endpoint |
createEndpoint(SocketAddress socketAddress)
Create an
Tracing.Endpoint given SocketAddress. |
TracerProvider |
getTracerProvider() |
boolean |
includeCommandArgsInSpanTags()
Returns
true if tags for Tracer.Spans should include the command arguments. |
TraceContextProvider |
initialTraceContextProvider() |
boolean |
isEnabled()
Returns
true if tracing is enabled. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearContext, disabled, getContext, withTraceContextProviderpublic static BraveTracing create(brave.Tracing tracing)
BraveTracing instance.tracing - must not be null.BraveTracing.public static BraveTracing.Builder builder()
BraveTracing.Builder to build BraveTracing.BraveTracing.Builder.public boolean isEnabled()
Tracingtrue if tracing is enabled.public boolean includeCommandArgsInSpanTags()
Tracingtrue if tags for Tracer.Spans should include the command arguments.includeCommandArgsInSpanTags in interface Tracingtrue if tags for Tracer.Spans should include the command arguments.public TracerProvider getTracerProvider()
getTracerProvider in interface TracingTracerProvider.public TraceContextProvider initialTraceContextProvider()
initialTraceContextProvider in interface TracingTraceContextProvider supplying the initial TraceContext (i.e. if there is no active span).public Tracing.Endpoint createEndpoint(SocketAddress socketAddress)
TracingTracing.Endpoint given SocketAddress.createEndpoint in interface TracingsocketAddress - the remote address.Tracing.Endpoint for SocketAddress.Copyright © 2021 lettuce.io. All rights reserved.