Package zipkin2
Class Annotation
java.lang.Object
zipkin2.Annotation
- All Implemented Interfaces:
Serializable
,Comparable<Annotation>
Associates an event that explains latency with a timestamp.
Unlike log statements, annotations are often codes: Ex. cache.miss
.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Annotation that) Compares bytimestamp
, thenvalue
.static Annotation
boolean
int
hashCode()
long
Microseconds from epoch.toString()
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()
-