public final class Annotation extends Object implements Comparable<Annotation>, Serializable
Unlike log statements, annotations are often codes: Ex. cache.miss
.
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Annotation that)
|
static Annotation |
create(long timestamp,
String value) |
boolean |
equals(Object o) |
int |
hashCode() |
long |
timestamp()
Microseconds from epoch.
|
String |
toString() |
String |
value()
Usually a short tag indicating an event, like
cache.miss or error |
public static Annotation create(long timestamp, String value)
public 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 String value()
cache.miss
or error
public int compareTo(Annotation that)
compareTo
in interface Comparable<Annotation>
Copyright © 2015–2018 OpenZipkin. All rights reserved.