Annotation Interface Metrics.Gauge

Enclosing class:
Metrics

@Retention(CLASS) @Documented @Intercepted @Target(METHOD) public static @interface Metrics.Gauge
The annotated method will be a gauge source.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Unit of the gauge must be provided.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the defined name in value() is an absolute name, or relative to the class containing the annotated element.
    Description of the metric.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Core metrics ignores this value, and this element will be removed.
    Additional tags of the metric.
    Name of the gauge.
  • Element Details

    • value

      String value
      Name of the gauge.
      Returns:
      gauge name
      Default:
      ""
    • scope

      @Deprecated(forRemoval=true, since="27.0.0") String scope
      Deprecated, for removal: This API element is subject to removal in a future version.
      Core metrics ignores this value, and this element will be removed.
      Scope value retained for compatibility; core metrics ignores it.
      Returns:
      configured value
      Default:
      "application"
    • description

      String description
      Description of the metric.
      Returns:
      metric description
      Default:
      ""
    • tags

      Metrics.Tag[] tags
      Additional tags of the metric.
      Returns:
      metric tags
      Default:
      {}
    • absoluteName

      boolean absoluteName
      Whether the defined name in value() is an absolute name, or relative to the class containing the annotated element.
      Returns:
      true if the name is absolute, false otherwise.
      Default:
      false
    • unit

      String unit
      Unit of the gauge must be provided.
      Returns:
      metric unit