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 intcompareTo(Annotation that)Compares bytimestamp, thenvalue.static Annotationcreate(long timestamp, String value)booleanequals(Object o)inthashCode()longtimestamp()Microseconds from epoch.StringtoString()Stringvalue()Usually a short tag indicating an event, likecache.missorerror
-
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,
gettimeofdayor multiplyingSystem.currentTimeMillis()by 1000. -
value
Usually a short tag indicating an event, likecache.missorerror -
compareTo
Compares bytimestamp, thenvalue.- Specified by:
compareToin interfaceComparable<Annotation>
-
toString
-
equals
-
hashCode
public int hashCode()
-