Annotation Interface Metric


@Public @Evolving @Documented @Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface Metric
Annotation interface for a single metric used to annotate a field or a method in the class.
  • Element Details

    • value

      String[] value
      Shorthand for optional name and description
      Returns:
      {description} or {name, description}
      Default:
      {}
    • about

      String about
      Returns:
      optional description of the metric
      Default:
      ""
    • sampleName

      String sampleName
      Returns:
      optional sample name for MutableStat/Rate/Rates
      Default:
      "Ops"
    • valueName

      String valueName
      Returns:
      optional value name for MutableStat/Rate/Rates
      Default:
      "Time"
    • always

      boolean always
      Returns:
      true to create a metric snapshot even if unchanged.
      Default:
      false
    • type

      Returns:
      optional type (counter|gauge) of the metric
      Default:
      DEFAULT
    • interval

      int interval
      Returns:
      optional roll over interval in secs for MutableQuantiles
      Default:
      10