Package zipkin2
Class Annotation
java.lang.Object
zipkin2.Annotation
- All Implemented Interfaces:
Serializable
,Comparable<Annotation>
public final class Annotation extends Object implements Comparable<Annotation>, Serializable
Associates an event that explains latency with a timestamp.
Unlike log statements, annotations are often codes: Ex. cache.miss
.
- See Also:
- Serialized Form
-
Method Summary
Modifier and Type Method Description int
compareTo(Annotation that)
Compares bytimestamp
, thenvalue
.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, likecache.miss
orerror
-
Method Details
-
create
-
timestamp
public long timestamp()Microseconds from epoch.This value should be set directly by instrumentation, using the most precise value possible. For example,
gettimeofday
or multiplyingSystem.currentTimeMillis()
by 1000. -
value
Usually a short tag indicating an event, likecache.miss
orerror
-
compareTo
Compares bytimestamp
, thenvalue
.- Specified by:
compareTo
in interfaceComparable<Annotation>
-
toString
-
equals
-
hashCode
public int hashCode()
-