final Object writeReplace() throws ObjectStreamException
ObjectStreamExceptionfinal Object writeReplace() throws ObjectStreamException
ObjectStreamExceptionlong traceIdHigh
traceIdHigh corresponds to the high bits in big-endian format and Span.traceId
corresponds to the low bits.
Ex. to convert the two fields to a 128bit opaque id array, you'd use code like below.
ByteBuffer traceId128 = ByteBuffer.allocate(16);
traceId128.putLong(span.traceIdHigh);
traceId128.putLong(span.traceId);
traceBytes = traceId128.array();
StorageComponent.Builder#strictTraceId(boolean)long traceId
String name
Conventionally, when the span name isn't known, name = "unknown".
long id
A span is uniquely identified in storage by (Span.traceId, #id).
Long parentId
Span.id or null if this the root span in a trace.Long timestamp
This value should be set directly by instrumentation, using the most precise value
possible. For example, gettimeofday or multiplying System.currentTimeMillis() by
1000.
For compatibility with instrumentation that precede this field, collectors or span stores
can derive this via Annotation.timestamp. For example, Constants.SERVER_RECV.timestamp
or Constants.CLIENT_SEND.timestamp.
Timestamp is nullable for input only. Spans without a timestamp cannot be presented in a timeline: Span stores should not output spans missing a timestamp.
There are two known edge-cases where this could be absent: both cases exist when a collector receives a span in parts and a binary annotation precedes a timestamp. This is possible when..
Long duration
This value should be set directly, as opposed to implicitly via annotation timestamps. Doing so encourages precision decoupled from problems of clocks, such as skew or NTP updates causing time to move backwards.
For compatibility with instrumentation that precede this field, collectors or span stores
can derive this by subtracting Annotation.timestamp. For example, Constants.SERVER_SEND.timestamp - Constants.SERVER_RECV.timestamp.
If this field is persisted as unset, zipkin will continue to work, except duration query support will be implementation-specific. Similarly, setting this field non-atomically is implementation-specific.
This field is i64 vs i32 to support spans longer than 35 minutes.
List<E> annotations
Unlike log statements, annotations are often codes: for example Constants.SERVER_RECV. Annotations are sorted ascending by timestamp.
List<E> binaryAnnotations
example, a binary annotation key could be "http.path".
Boolean debug
Copyright © 2015–2017 OpenZipkin. All rights reserved.