Annotation Interface MetricsLabels


@Target(METHOD) @Retention(RUNTIME) public @interface MetricsLabels
The MetricsLabels descriptor annotation adds a metrics.labels field and its value to the descriptor for a method on an MBean. The existence of this annotation on an MBean attribute indicates that the MBean attribute is mapped to a metrics value with additional tags. By default, an MBean attribute is not mapped to a metrics value or metrics tag.

This annotation is intended to be put on MBean attribute type's containing meta info about all the metrics.values associated with an MBean.

Since:
20.12
Author:
Jonathan Knight 2020.10.14
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the additional metric tags.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The MBean descriptor key that this annotation creates.
  • Field Details

    • DESCRIPTOR_KEY

      static final String DESCRIPTOR_KEY
      The MBean descriptor key that this annotation creates.
      See Also:
  • Element Details

    • value

      @DescriptorKey("metric.labels") String[] value
      Returns the additional metric tags.

      The value should be a String array of key/value pairs, therefore there should be an even number of String values.

      Returns:
      the additional metric tags