Class MetricOptions

  • Direct Known Subclasses:
    AutoValue_MetricOptions

    @Immutable
    public abstract class MetricOptions
    extends java.lang.Object
    Options for every metric added to the MetricRegistry.
    Since:
    0.20
    • Constructor Detail

      • MetricOptions

        MetricOptions()
    • Method Detail

      • getDescription

        public abstract java.lang.String getDescription()
        Returns the description of the Metric.

        Default value is "".

        Returns:
        the description of the Metric.
        Since:
        0.20
      • getUnit

        public abstract java.lang.String getUnit()
        Returns the unit of the Metric.

        Default value is "1".

        Returns:
        the unit of the Metric.
        Since:
        0.20
      • getLabelKeys

        public abstract java.util.List<LabelKey> getLabelKeys()
        Returns the list of label keys for the Metric.

        Default value is Collections.emptyList().

        Returns:
        the list of label keys for the Metric.
        Since:
        0.20
      • getConstantLabels

        public abstract java.util.Map<LabelKey,​LabelValue> getConstantLabels()
        Returns the map of constant labels (they will be added to all the TimeSeries) for the Metric.

        Default value is Collections.emptyMap().

        Returns:
        the map of constant labels for the Metric.
        Since:
        0.21