Class Exemplar


  • public class Exemplar
    extends Object
    Immutable data class holding an Exemplar.
    • Constructor Detail

      • Exemplar

        public Exemplar​(double value,
                        String... labels)
        Create an Exemplar without a timestamp
        Parameters:
        value - the observed value
        labels - name/value pairs. Expecting an even number of strings. The combined length of the label names and values must not exceed 128 UTF-8 characters. Neither a label name nor a label value may be null.
      • Exemplar

        public Exemplar​(double value,
                        Long timestampMs,
                        String... labels)
        Create an Exemplar
        Parameters:
        value - the observed value
        timestampMs - as in System.currentTimeMillis()
        labels - name/value pairs. Expecting an even number of strings. The combined length of the label names and values must not exceed 128 UTF-8 characters. Neither a label name nor a label value may be null.
      • Exemplar

        public Exemplar​(double value,
                        Map<String,​String> labels)
        Create an Exemplar
        Parameters:
        value - the observed value
        labels - the labels. Must not be null. The combined length of the label names and values must not exceed 128 UTF-8 characters. Neither a label name nor a label value may be null.
      • Exemplar

        public Exemplar​(double value,
                        Long timestampMs,
                        Map<String,​String> labels)
        Create an Exemplar
        Parameters:
        value - the observed value
        timestampMs - as in System.currentTimeMillis()
        labels - the labels. Must not be null. The combined length of the label names and values must not exceed 128 UTF-8 characters. Neither a label name nor a label value may be null.