Interface MetricGroup

    • Method Detail

      • counter

        default Counter counter​(int name)
        Creates and registers a new Counter with Flink.
        Parameters:
        name - name of the counter
        Returns:
        the created counter
      • counter

        Counter counter​(String name)
        Creates and registers a new Counter with Flink.
        Parameters:
        name - name of the counter
        Returns:
        the created counter
      • counter

        default <C extends Counter> C counter​(int name,
                                              C counter)
        Registers a Counter with Flink.
        Type Parameters:
        C - counter type
        Parameters:
        name - name of the counter
        counter - counter to register
        Returns:
        the given counter
      • counter

        <C extends Counter> C counter​(String name,
                                      C counter)
        Registers a Counter with Flink.
        Type Parameters:
        C - counter type
        Parameters:
        name - name of the counter
        counter - counter to register
        Returns:
        the given counter
      • gauge

        default <T,​G extends Gauge<T>> G gauge​(int name,
                                                     G gauge)
        Registers a new Gauge with Flink.
        Type Parameters:
        T - return type of the gauge
        Parameters:
        name - name of the gauge
        gauge - gauge to register
        Returns:
        the given gauge
      • gauge

        <T,​G extends Gauge<T>> G gauge​(String name,
                                             G gauge)
        Registers a new Gauge with Flink.
        Type Parameters:
        T - return type of the gauge
        Parameters:
        name - name of the gauge
        gauge - gauge to register
        Returns:
        the given gauge
      • histogram

        <H extends Histogram> H histogram​(String name,
                                          H histogram)
        Registers a new Histogram with Flink.
        Type Parameters:
        H - histogram type
        Parameters:
        name - name of the histogram
        histogram - histogram to register
        Returns:
        the registered histogram
      • histogram

        default <H extends Histogram> H histogram​(int name,
                                                  H histogram)
        Registers a new Histogram with Flink.
        Type Parameters:
        H - histogram type
        Parameters:
        name - name of the histogram
        histogram - histogram to register
        Returns:
        the registered histogram
      • meter

        <M extends Meter> M meter​(String name,
                                  M meter)
        Registers a new Meter with Flink.
        Type Parameters:
        M - meter type
        Parameters:
        name - name of the meter
        meter - meter to register
        Returns:
        the registered meter
      • meter

        default <M extends Meter> M meter​(int name,
                                          M meter)
        Registers a new Meter with Flink.
        Type Parameters:
        M - meter type
        Parameters:
        name - name of the meter
        meter - meter to register
        Returns:
        the registered meter
      • addGroup

        default MetricGroup addGroup​(int name)
        Creates a new MetricGroup and adds it to this groups sub-groups.
        Parameters:
        name - name of the group
        Returns:
        the created group
      • addGroup

        MetricGroup addGroup​(String name)
        Creates a new MetricGroup and adds it to this groups sub-groups.
        Parameters:
        name - name of the group
        Returns:
        the created group
      • addGroup

        MetricGroup addGroup​(String key,
                             String value)
        Creates a new key-value MetricGroup pair. The key group is added to this groups sub-groups, while the value group is added to the key group's sub-groups. This method returns the value group.

        The only difference between calling this method and group.addGroup(key).addGroup(value) is that getAllVariables() of the value group return an additional "<key>"="value" pair.

        Parameters:
        key - name of the first group
        value - name of the second group
        Returns:
        the second created group
      • getAllVariables

        Map<String,​String> getAllVariables()
        Returns a map of all variables and their associated value, for example {"<host>"="host-7", "<tm_id>"="taskmanager-2"}.
        Returns:
        map of all variables and their associated value
      • getMetricIdentifier

        String getMetricIdentifier​(String metricName)
        Returns the fully qualified metric name, for example "host-7.taskmanager-2.window_word_count.my-mapper.metricName".
        Parameters:
        metricName - metric name
        Returns:
        fully qualified metric name
      • getMetricIdentifier

        String getMetricIdentifier​(String metricName,
                                   CharacterFilter filter)
        Returns the fully qualified metric name, for example "host-7.taskmanager-2.window_word_count.my-mapper.metricName".
        Parameters:
        metricName - metric name
        filter - character filter which is applied to the scope components if not null.
        Returns:
        fully qualified metric name