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)Spanbuild()Span.Builderclear()Span.BuilderclearAnnotations()Span.BuilderclearTags()Span.Builderclone()Span.Builderdebug(boolean debug)Span.Builderdebug(Boolean debug)Span.Builderduration(long duration)Span.Builderduration(Long duration)Span.Builderid(long id)Encodes 64 bits from the input into a hex span ID.Span.Builderid(String id)Span.Kindkind()Span.Builderkind(Span.Kind kind)EndpointlocalEndpoint()Span.BuilderlocalEndpoint(Endpoint localEndpoint)Span.Buildermerge(Span source)Used to merge multiple incomplete spans representing the same operation on the same host.Span.Buildername(String name)Span.BuilderparentId(long parentId)Encodes 64 bits from the input into a hex parent ID.Span.BuilderparentId(String parentId)Span.BuilderputTag(String key, String value)Span.BuilderremoteEndpoint(Endpoint remoteEndpoint)Span.Buildershared(boolean shared)Span.Buildershared(Boolean shared)Span.Buildertimestamp(long timestamp)Span.Buildertimestamp(Long timestamp)Span.BuildertraceId(long high, long low)Encodes 64 or 128 bits from the input into a hex trace ID.Span.BuildertraceId(String traceId)
-
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
- Throws:
IllegalArgumentException- if not lower-hex format- See Also:
Span.id()
-
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
Encodes 64 bits from the input into a hex parent ID. Unsets theSpan.parentId()if the input is 0.- See Also:
Span.parentId()
-
parentId
- Throws:
IllegalArgumentException- if not lower-hex format- See Also:
Span.parentId()
-
id
Encodes 64 bits from the input into a hex span ID.- Throws:
IllegalArgumentException- if the input is zero- See Also:
Span.id()
-
id
- Throws:
IllegalArgumentException- if not lower-hex format- See Also:
Span.id()
-
kind
- See Also:
Span.kind
-
name
- See Also:
Span.name
-
timestamp
- See Also:
Span.timestampAsLong()
-
timestamp
- See Also:
Span.timestamp()
-
duration
- See Also:
Span.durationAsLong()
-
duration
- See Also:
Span.duration()
-
localEndpoint
- See Also:
Span.localEndpoint
-
remoteEndpoint
- See Also:
Span.remoteEndpoint
-
addAnnotation
- See Also:
Span.annotations
-
clearAnnotations
- See Also:
Span.annotations
-
putTag
- See Also:
Span.tags
-
clearTags
- See Also:
Span.tags
-
debug
- See Also:
Span.debug()
-
debug
- See Also:
Span.debug()
-
shared
- See Also:
Span.shared()
-
shared
- See Also:
Span.shared()
-
build
-