Package io.lettuce.core.tracing
Class Tracer.Span
- java.lang.Object
-
- io.lettuce.core.tracing.Tracer.Span
-
- Enclosing class:
- Tracer
public abstract static class Tracer.Span extends Object
Used to model the latency of an operation along with tags such as name or theTracing.Endpoint
.
-
-
Constructor Summary
Constructors Constructor Description Span()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Tracer.Span
annotate(String value)
Associates an event that explains latency with the current system time.abstract Tracer.Span
error(Throwable throwable)
Associate anerror
with thisTracer.Span
.abstract void
finish()
Reports the span complete.abstract Tracer.Span
name(String name)
Sets the name for thisTracer.Span
.abstract Tracer.Span
remoteEndpoint(Tracing.Endpoint endpoint)
Associates anTracing.Endpoint
with thisTracer.Span
.abstract Tracer.Span
start(RedisCommand<?,?,?> command)
Starts the span with.abstract Tracer.Span
tag(String key, String value)
Associates a tag with thisTracer.Span
.
-
-
-
Method Detail
-
start
public abstract Tracer.Span start(RedisCommand<?,?,?> command)
Starts the span with.- Parameters:
command
- the underlying command.- Returns:
- this
Tracer.Span
.
-
name
public abstract Tracer.Span name(String name)
Sets the name for thisTracer.Span
.- Parameters:
name
- must not benull
.- Returns:
- this
Tracer.Span
.
-
annotate
public abstract Tracer.Span annotate(String value)
Associates an event that explains latency with the current system time.- Parameters:
value
- A short tag indicating the event, like "finagle.retry"
-
tag
public abstract Tracer.Span tag(String key, String value)
Associates a tag with thisTracer.Span
.- Parameters:
key
- must not benull
.value
- must not benull
.- Returns:
- this
Tracer.Span
.
-
error
public abstract Tracer.Span error(Throwable throwable)
Associate anerror
with thisTracer.Span
.- Parameters:
throwable
- must not benull
.- Returns:
- this
Tracer.Span
.
-
remoteEndpoint
public abstract Tracer.Span remoteEndpoint(Tracing.Endpoint endpoint)
Associates anTracing.Endpoint
with thisTracer.Span
.- Parameters:
endpoint
- must not benull
.- Returns:
- this
Tracer.Span
.
-
finish
public abstract void finish()
Reports the span complete.
-
-