Interface Metrics


  • public interface Metrics
    The metrics API gives access to creating metrics within Java Actions. The implementation uses Micrometer and sends created metrics to configured metrics backend.
    • Method Detail

      • createCounter

        Metric.Builder<Counter> createCounter​(java.lang.String name)
        Creates a builder to build a Counter.
        Parameters:
        name - unique name of the counter.
        Returns:
        a builder to create Counter.
      • createTimer

        Metric.Builder<Timer> createTimer​(java.lang.String name)
        Creates a builder to build a Timer.
        Parameters:
        name - unique name of the timer.
        Returns:
        a builder to create Timer.
      • createGauge

        Metric.Builder<Gauge> createGauge​(java.lang.String name)
        Creates a builder to build a Gauge.
        Parameters:
        name - unique name of the gauge. *
        Returns:
        a builder to create Gauge
      • counters

        @Deprecated
        Counters counters()
        Deprecated.
        Counters count occurrences of an event.
        Returns:
        an object that contains different methods for setting counter values.
      • timers

        @Deprecated
        Timers timers()
        Deprecated.
        Timers measure the amount of time an action took to complete, in milliseconds.
        Returns:
        an object that contains different methods for setting timer values.
      • gauges

        @Deprecated
        Gauges gauges()
        Deprecated.
        Gauges are arbitrary, persistent values.
        Returns:
        an object that contains different methods for setting gauge values.
      • sets

        @Deprecated
        Sets sets()
        Deprecated.
        We don't support Sets anymore.
        Sets report the number of unique elements that are received in a flush period. A flush period is the amount of time that is configured between sending metrics from the StatsD backend to the persistence component.
        Returns:
        an object that contains different methods for setting set values.