Module lettuce.core

Class BraveTracing

java.lang.Object
io.lettuce.core.tracing.BraveTracing
All Implemented Interfaces:
Tracing

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 Propagation

Redis commands can use a parent trace context to create a Tracer.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):

  1. A TraceContextProvider
  2. A Brave Span: Commands extract the TraceContext
  3. A Brave TraceContext
If one of the context objects above is found, it's used to determine the parent context for the command Span.
Since:
5.1
Author:
Mark Paluch, Daniel Albuquerque
See Also:
Tracer, Tracing.currentTracer(), BraveTracing.BraveTraceContextProvider, builder()