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.BuilderaddAnnotation(long timestamp, String value)SetsSpan.annotationsSpanbuild()Span.Builderclear()Span.BuilderclearAnnotations()SetsSpan.annotationsSpan.BuilderclearTags()SetsSpan.tagsSpan.Builderclone()Span.Builderdebug(boolean debug)SetsSpan.debug()Span.Builderdebug(Boolean debug)SetsSpan.debug()Span.Builderduration(long duration)Span.Builderduration(Long duration)SetsSpan.duration()Span.Builderid(long id)Hex encodes the input as theSpan.id()or throws IllegalArgumentException if the input is zero.Span.Builderid(String id)SetsSpan.id()or throwsIllegalArgumentExceptionif not lower-hex format.Span.Kindkind()Span.Builderkind(Span.Kind kind)SetsSpan.kindEndpointlocalEndpoint()Span.BuilderlocalEndpoint(Endpoint localEndpoint)SetsSpan.localEndpointSpan.Buildermerge(Span source)Used to merge multiple incomplete spans representing the same operation on the same host.Span.Buildername(String name)SetsSpan.nameSpan.BuilderparentId(long parentId)Hex encodes the input as theSpan.parentId()or unsets if the input is zero.Span.BuilderparentId(String parentId)SetsSpan.parentId()or throwsIllegalArgumentExceptionif not lower-hex format.Span.BuilderputTag(String key, String value)SetsSpan.tagsSpan.BuilderremoteEndpoint(Endpoint remoteEndpoint)SetsSpan.remoteEndpointSpan.Buildershared(boolean shared)SetsSpan.shared()Span.Buildershared(Boolean shared)SetsSpan.shared()Span.Buildertimestamp(long timestamp)Span.Buildertimestamp(Long timestamp)SetsSpan.timestamp()Span.BuildertraceId(long high, long low)Encodes 64 or 128 bits from the input into a hex trace ID.Span.BuildertraceId(String traceId)SetsSpan.id()or throwsIllegalArgumentExceptionif 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 throwsIllegalArgumentExceptionif 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 throwsIllegalArgumentExceptionif not lower-hex format. -
id
Hex encodes the input as theSpan.id()or throws IllegalArgumentException if the input is zero. -
id
SetsSpan.id()or throwsIllegalArgumentExceptionif 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
-