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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Annotation that)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 Detail
-
create
public static Annotation create(long timestamp, String value)
-
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
public String value()
Usually a short tag indicating an event, likecache.missorerror
-
compareTo
public int compareTo(Annotation that)
- Specified by:
compareToin interfaceComparable<Annotation>
-
-