brave.propagation.TraceContext@Deprecated
public final class SpanId
extends java.lang.Object
This implementation is biased towards a fixed-length binary serialization format that doesn't
have a way to represent an absent parent (root span). In this serialized form, a root span is
when all three ids are the same. Alternatively, you can use nullableParentId().
Particularly, this includes sampled state, and a portable binary representation. The
implementation is a port of com.twitter.finagle.tracing.TraceId.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
SpanId.Builder |
Deprecated.
|
| Modifier and Type | Field | Description |
|---|---|---|
static int |
FLAG_DEBUG |
Deprecated.
|
static int |
FLAG_IS_ROOT |
Deprecated.
When set, we can ignore the value of the
parentId |
static int |
FLAG_SAMPLED |
Deprecated.
|
static int |
FLAG_SAMPLING_SET |
Deprecated.
When set, we can interpret
FLAG_SAMPLED as a set value. |
long |
flags |
Deprecated.
Raw flags encoded in
bytes() |
long |
parentId |
Deprecated.
|
boolean |
shared |
Deprecated.
it is unnecessary overhead to propagate this property
|
long |
spanId |
Deprecated.
Unique 8-byte identifier of this span within a trace.
|
long |
traceId |
Deprecated.
Unique 8-byte identifier for a trace, set on all spans within it.
|
long |
traceIdHigh |
Deprecated.
When non-zero, the trace containing this span uses 128-bit trace identifiers.
|
| Constructor | Description |
|---|---|
SpanId(long traceId,
long parentId,
long spanId,
long flags) |
Deprecated.
Please use
SpanId.Builder |
| Modifier and Type | Method | Description |
|---|---|---|
static SpanId.Builder |
builder() |
Deprecated.
|
byte[] |
bytes() |
Deprecated.
Serializes this into a big-endian byte array
|
static SpanId |
create(long traceId,
long spanId,
java.lang.Long parentSpanId) |
Deprecated.
Please use
SpanId.Builder |
boolean |
debug() |
Deprecated.
True is a request to store this span even if it overrides sampling policy.
|
boolean |
equals(java.lang.Object o) |
Deprecated.
|
static SpanId |
fromBytes(byte[] bytes) |
Deprecated.
Deserializes this from a big-endian byte array
|
java.lang.Long |
getParentSpanId() |
Deprecated.
|
long |
getSpanId() |
Deprecated.
use
spanId |
long |
getTraceId() |
Deprecated.
use
traceId |
int |
hashCode() |
Deprecated.
|
java.lang.Long |
nullableParentId() |
Deprecated.
Returns null when this is a root span.
|
boolean |
root() |
Deprecated.
Returns true if this is the root span.
|
java.lang.Boolean |
sampled() |
Deprecated.
Should we sample this request or not? True means sample, false means don't, null means we defer
decision to someone further down in the stack.
|
SpanId.Builder |
toBuilder() |
Deprecated.
|
java.lang.String |
toString() |
Deprecated.
Returns
$traceId.$spanId<:$parentId |
java.lang.String |
traceIdString() |
Deprecated.
Returns the hex representation of the span's trace ID
|
public static final int FLAG_DEBUG
public static final int FLAG_SAMPLING_SET
FLAG_SAMPLED as a set value.public static final int FLAG_SAMPLED
public static final int FLAG_IS_ROOT
parentId
While many zipkin systems re-use a trace id as the root span id, we know that some don't. With this flag, we can tell for sure if the span is root as opposed to the convention trace id == span id == parent id.
public final long traceIdHigh
public final long traceId
public final long parentId
public final long spanId
A span is uniquely identified in storage by (traceId, #id).
public final long flags
bytes()@Deprecated public final boolean shared
@Deprecated
public SpanId(long traceId,
long parentId,
long spanId,
long flags)
SpanId.Builder@Deprecated public static SpanId create(long traceId, long spanId, @Nullable java.lang.Long parentSpanId)
SpanId.BuildertraceId - Trace Id.spanId - Span Id.parentSpanId - Nullable parent span id.public static SpanId fromBytes(byte[] bytes)
public static SpanId.Builder builder()
@Deprecated public long getTraceId()
traceId@Deprecated public long getSpanId()
spanId@Deprecated @Nullable public java.lang.Long getParentSpanId()
nullableParentId()null.@Nullable public java.lang.Long nullableParentId()
public final boolean root()
public final boolean debug()
sampled().@Nullable public final java.lang.Boolean sampled()
public byte[] bytes()
public SpanId.Builder toBuilder()
public java.lang.String toString()
$traceId.$spanId<:$parentIdtoString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String traceIdString()
Copyright © 2018 OpenZipkin. All rights reserved.