Interface Metrics


public interface Metrics
WARNING: Experimental feature. At any time this feature may be changed without prior notice until it is marked as non-experimental.

The metrics API gives access to creating metrics within Java Actions. The implementation primarily supports the StatsD schema (with tags as an extension) and sends created metrics to a configured UDP host and port. If StatsD is not configured the metrics metrics will be send to the logger, the logger is only intended for testing purposes and not for any production use cases.
  • Method Summary

    Modifier and Type
    Method
    Description
    Counters count occurrences of an event.
    Gauges are arbitrary, persistent values.
    Sets report the number of unique elements that are received in a flush period.
    Timers measure the amount of time an action took to complete, in milliseconds.
  • Method Details

    • counters

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

      Timers timers()
      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

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

      Sets sets()
      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.