public final class Annotation extends Object implements Comparable<Annotation>, Serializable
Unlike log statements, annotations are often codes: Ex. "sr".
| Modifier and Type | Class and Description |
|---|---|
static class |
Annotation.Builder |
| Modifier and Type | Field and Description |
|---|---|
Endpoint |
endpoint
The host that recorded
value, primarily for query by service name. |
long |
timestamp
Microseconds from epoch.
|
String |
value
Usually a short tag indicating an event, like
"sr". |
| Modifier and Type | Method and Description |
|---|---|
static Annotation.Builder |
builder() |
int |
compareTo(Annotation that)
|
static Annotation |
create(long timestamp,
String value,
Endpoint endpoint) |
boolean |
equals(Object o) |
int |
hashCode() |
Annotation.Builder |
toBuilder() |
String |
toString() |
public final 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.
public final String value
public static Annotation create(long timestamp, String value, @Nullable Endpoint endpoint)
public Annotation.Builder toBuilder()
public static Annotation.Builder builder()
public int compareTo(Annotation that)
compareTo in interface Comparable<Annotation>Copyright © 2015–2018 OpenZipkin. All rights reserved.