Package zipkin2
Class Span.Builder
java.lang.Object
zipkin2.Span.Builder
- Enclosing class:
- Span
public static final class Span.Builder extends Object
-
Method Summary
Modifier and Type Method Description Span.Builder
addAnnotation(long timestamp, String value)
SetsSpan.annotations
Span
build()
Span.Builder
clear()
Span.Builder
clearAnnotations()
SetsSpan.annotations
Span.Builder
clearTags()
SetsSpan.tags
Span.Builder
clone()
Span.Builder
debug(boolean debug)
SetsSpan.debug()
Span.Builder
debug(Boolean debug)
SetsSpan.debug()
Span.Builder
duration(long duration)
Span.Builder
duration(Long duration)
SetsSpan.duration()
Span.Builder
id(long id)
Hex encodes the input as theSpan.id()
or throws IllegalArgumentException if the input is zero.Span.Builder
id(String id)
SetsSpan.id()
or throwsIllegalArgumentException
if not lower-hex format.Span.Kind
kind()
Span.Builder
kind(Span.Kind kind)
SetsSpan.kind
Endpoint
localEndpoint()
Span.Builder
localEndpoint(Endpoint localEndpoint)
SetsSpan.localEndpoint
Span.Builder
merge(Span source)
Used to merge multiple incomplete spans representing the same operation on the same host.Span.Builder
name(String name)
SetsSpan.name
Span.Builder
parentId(long parentId)
Hex encodes the input as theSpan.parentId()
or unsets if the input is zero.Span.Builder
parentId(String parentId)
SetsSpan.parentId()
or throwsIllegalArgumentException
if not lower-hex format.Span.Builder
putTag(String key, String value)
SetsSpan.tags
Span.Builder
remoteEndpoint(Endpoint remoteEndpoint)
SetsSpan.remoteEndpoint
Span.Builder
shared(boolean shared)
SetsSpan.shared()
Span.Builder
shared(Boolean shared)
SetsSpan.shared()
Span.Builder
timestamp(long timestamp)
Span.Builder
timestamp(Long timestamp)
SetsSpan.timestamp()
Span.Builder
traceId(long high, long low)
Encodes 64 or 128 bits from the input into a hex trace ID.Span.Builder
traceId(String traceId)
SetsSpan.id()
or throwsIllegalArgumentException
if not lower-hex format.
-
Method Details
-
clear
-
clone
-
merge
Used to merge multiple incomplete spans representing the same operation on the same host. Do not use this to merge spans that occur on different hosts. -
kind
-
localEndpoint
-
traceId
SetsSpan.id()
or throwsIllegalArgumentException
if not lower-hex format. -
traceId
Encodes 64 or 128 bits from the input into a hex trace ID.- Parameters:
high
- Upper 64bits of the trace ID. Zero means the trace ID is 64-bit.low
- Lower 64bits of the trace ID.- Throws:
IllegalArgumentException
- if both values are zero
-
parentId
Hex encodes the input as theSpan.parentId()
or unsets if the input is zero. -
parentId
SetsSpan.parentId()
or throwsIllegalArgumentException
if not lower-hex format. -
id
Hex encodes the input as theSpan.id()
or throws IllegalArgumentException if the input is zero. -
id
SetsSpan.id()
or throwsIllegalArgumentException
if not lower-hex format. -
kind
SetsSpan.kind
-
name
SetsSpan.name
-
timestamp
-
timestamp
SetsSpan.timestamp()
-
duration
-
duration
SetsSpan.duration()
-
localEndpoint
SetsSpan.localEndpoint
-
remoteEndpoint
SetsSpan.remoteEndpoint
-
addAnnotation
SetsSpan.annotations
-
clearAnnotations
SetsSpan.annotations
-
putTag
SetsSpan.tags
-
clearTags
SetsSpan.tags
-
debug
SetsSpan.debug()
-
debug
SetsSpan.debug()
-
shared
SetsSpan.shared()
-
shared
SetsSpan.shared()
-
build
-