Package zipkin2.proto3
Class Span.Builder
- java.lang.Object
- 
- com.squareup.wire.Message.Builder<Span,Span.Builder>
- 
- zipkin2.proto3.Span.Builder
 
 
- 
- Enclosing class:
- Span
 
 public static final class Span.Builder extends com.squareup.wire.Message.Builder<Span,Span.Builder> 
- 
- 
Field SummaryFields Modifier and Type Field Description java.util.List<Annotation>annotationsjava.lang.Booleandebugjava.lang.Longdurationokio.ByteStringidSpan.KindkindEndpointlocal_endpointjava.lang.Stringnameokio.ByteStringparent_idEndpointremote_endpointjava.lang.Booleansharedjava.util.Map<java.lang.String,java.lang.String>tagsjava.lang.Longtimestampokio.ByteStringtrace_id
 - 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Span.Builderannotations(java.util.List<Annotation> annotations)Associates events that explain latency with the time they happened.Spanbuild()Span.Builderdebug(java.lang.Boolean debug)True is a request to store this span even if it overrides sampling policy.Span.Builderduration(java.lang.Long duration)Duration in microseconds of the critical path, if known.Span.Builderid(okio.ByteString id)Unique identifier for this operation within the trace.Span.Builderkind(Span.Kind kind)When present, used to interpret remote_endpointSpan.Builderlocal_endpoint(Endpoint local_endpoint)The host that recorded this span, primarily for query by service name.Span.Buildername(java.lang.String name)The logical operation this span represents in lowercase (e.g.Span.Builderparent_id(okio.ByteString parent_id)The parent span ID or absent if this the root span in a trace.Span.Builderremote_endpoint(Endpoint remote_endpoint)When an RPC (or messaging) span, indicates the other side of the connection.Span.Buildershared(java.lang.Boolean shared)True if we are contributing to a span started by another tracer (ex on a different host).Span.Buildertags(java.util.Map<java.lang.String,java.lang.String> tags)Tags give your span context for search, viewing and analysis.Span.Buildertimestamp(java.lang.Long timestamp)Epoch microseconds of the start of this span, possibly absent if incomplete.Span.Buildertrace_id(okio.ByteString trace_id)Randomly generated, unique identifier for a trace, set on all spans within it.
 
- 
- 
- 
Field Detail- 
trace_idpublic okio.ByteString trace_id 
 - 
parent_idpublic okio.ByteString parent_id 
 - 
idpublic okio.ByteString id 
 - 
kindpublic Span.Kind kind 
 - 
namepublic java.lang.String name 
 - 
timestamppublic java.lang.Long timestamp 
 - 
durationpublic java.lang.Long duration 
 - 
local_endpointpublic Endpoint local_endpoint 
 - 
remote_endpointpublic Endpoint remote_endpoint 
 - 
annotationspublic java.util.List<Annotation> annotations 
 - 
tagspublic java.util.Map<java.lang.String,java.lang.String> tags 
 - 
debugpublic java.lang.Boolean debug 
 - 
sharedpublic java.lang.Boolean shared 
 
- 
 - 
Method Detail- 
trace_idpublic Span.Builder trace_id(okio.ByteString trace_id) Randomly generated, unique identifier for a trace, set on all spans within it. This field is required and encoded as 8 or 16 bytes, in big endian byte order.
 - 
parent_idpublic Span.Builder parent_id(okio.ByteString parent_id) The parent span ID or absent if this the root span in a trace.
 - 
idpublic Span.Builder id(okio.ByteString id) Unique identifier for this operation within the trace. This field is required and encoded as 8 opaque bytes.
 - 
kindpublic Span.Builder kind(Span.Kind kind) When present, used to interpret remote_endpoint
 - 
namepublic Span.Builder name(java.lang.String name) The logical operation this span represents in lowercase (e.g. rpc method). Leave absent if unknown. As these are lookup labels, take care to ensure names are low cardinality. For example, do not embed variables into the name.
 - 
timestamppublic Span.Builder timestamp(java.lang.Long timestamp) Epoch microseconds of the start of this span, possibly absent if incomplete. For example, 1502787600000000 corresponds to 2017-08-15 09:00 UTC This value should be set directly by instrumentation, using the most precise value possible. For example, gettimeofday or multiplying epoch millis by 1000. There are three known edge-cases where this could be reported absent. - A span was allocated but never started (ex not yet received a timestamp) - The span's start event was lost - Data about a completed span (ex tags) were sent after the fact
 - 
durationpublic Span.Builder duration(java.lang.Long duration) Duration in microseconds of the critical path, if known. Durations of less than one are rounded up. Duration of children can be longer than their parents due to asynchronous operations. For example 150 milliseconds is 150000 microseconds.
 - 
local_endpointpublic Span.Builder local_endpoint(Endpoint local_endpoint) The host that recorded this span, primarily for query by service name. Instrumentation should always record this. Usually, absent implies late data. The IP address corresponding to this is usually the site local or advertised service address. When present, the port indicates the listen port.
 - 
remote_endpointpublic Span.Builder remote_endpoint(Endpoint remote_endpoint) When an RPC (or messaging) span, indicates the other side of the connection. By recording the remote endpoint, your trace will contain network context even if the peer is not tracing. For example, you can record the IP from the "X-Forwarded-For" header or the service name and socket of a remote peer.
 - 
annotationspublic Span.Builder annotations(java.util.List<Annotation> annotations) Associates events that explain latency with the time they happened.
 - 
tagspublic Span.Builder tags(java.util.Map<java.lang.String,java.lang.String> tags) Tags give your span context for search, viewing and analysis. For example, a key "your_app.version" would let you lookup traces by version. A tag "sql.query" isn't searchable, but it can help in debugging when viewing a trace.
 - 
debugpublic Span.Builder debug(java.lang.Boolean debug) True is a request to store this span even if it overrides sampling policy. This is true when the "X-B3-Flags" header has a value of 1.
 - 
sharedpublic Span.Builder shared(java.lang.Boolean shared) True if we are contributing to a span started by another tracer (ex on a different host).
 - 
buildpublic Span build() - Specified by:
- buildin class- com.squareup.wire.Message.Builder<Span,Span.Builder>
 
 
- 
 
-