Package zipkin2
Class Span.Builder
- java.lang.Object
-
- zipkin2.Span.Builder
-
-
Method Summary
-
-
-
Method Detail
-
clear
public Span.Builder clear()
-
clone
public Span.Builder clone()
-
merge
public Span.Builder merge(Span source)
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
@Nullable public Span.Kind kind()
-
localEndpoint
@Nullable public Endpoint localEndpoint()
-
traceId
public Span.Builder traceId(String traceId)
SetsSpan.id()
or throwsIllegalArgumentException
if not lower-hex format.
-
traceId
public Span.Builder traceId(long high, long low)
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
public Span.Builder parentId(long parentId)
Hex encodes the input as theSpan.parentId()
or unsets if the input is zero.
-
parentId
public Span.Builder parentId(@Nullable String parentId)
SetsSpan.parentId()
or throwsIllegalArgumentException
if not lower-hex format.
-
id
public Span.Builder id(long id)
Hex encodes the input as theSpan.id()
or throws IllegalArgumentException if the input is zero.
-
id
public Span.Builder id(String id)
SetsSpan.id()
or throwsIllegalArgumentException
if not lower-hex format.
-
kind
public Span.Builder kind(@Nullable Span.Kind kind)
SetsSpan.kind
-
name
public Span.Builder name(@Nullable String name)
SetsSpan.name
-
timestamp
public Span.Builder timestamp(long timestamp)
-
timestamp
public Span.Builder timestamp(@Nullable Long timestamp)
SetsSpan.timestamp()
-
duration
public Span.Builder duration(long duration)
-
duration
public Span.Builder duration(@Nullable Long duration)
SetsSpan.duration()
-
localEndpoint
public Span.Builder localEndpoint(@Nullable Endpoint localEndpoint)
SetsSpan.localEndpoint
-
remoteEndpoint
public Span.Builder remoteEndpoint(@Nullable Endpoint remoteEndpoint)
SetsSpan.remoteEndpoint
-
addAnnotation
public Span.Builder addAnnotation(long timestamp, String value)
SetsSpan.annotations
-
clearAnnotations
public Span.Builder clearAnnotations()
SetsSpan.annotations
-
putTag
public Span.Builder putTag(String key, String value)
SetsSpan.tags
-
clearTags
public Span.Builder clearTags()
SetsSpan.tags
-
debug
public Span.Builder debug(boolean debug)
SetsSpan.debug()
-
debug
public Span.Builder debug(@Nullable Boolean debug)
SetsSpan.debug()
-
shared
public Span.Builder shared(boolean shared)
SetsSpan.shared()
-
shared
public Span.Builder shared(@Nullable Boolean shared)
SetsSpan.shared()
-
build
public Span build()
-
-