Class MetricDefinition.Label

  • Enclosing class:
    MetricDefinition

    public static class MetricDefinition.Label
    extends Object
    This type is used to represent a label that is attached to a metric.

    Labels can have either a static value or an expression. If the value is an expression then this is evaluated as a watcher and the result is used as the label value.

    • Constructor Detail

      • Label

        public Label​(String key,
                     Object value,
                     String expression)
        Create a new label for a metric.
        Parameters:
        key - the label key
        value - the label value if a fixed value
        expression - the label expression if we should evaluate the label value