Package zipkin2

Class Annotation

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Annotation>

    public final class Annotation
    extends java.lang.Object
    implements java.lang.Comparable<Annotation>, java.io.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 Detail

      • create

        public static Annotation create​(long timestamp,
                                        java.lang.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, gettimeofday or multiplying System.currentTimeMillis() by 1000.

      • value

        public java.lang.String value()
        Usually a short tag indicating an event, like cache.miss or error
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object