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 Details

    • createCounter

      Metric.Builder<Counter> createCounter(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(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(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.
      Please use Core.metrics().createCounter(String). This method will be removed in Mendix 11.
      Counters count occurrences of an event.
      Returns:
      an object that contains different methods for setting counter values
    • timers

      Deprecated.
      Please use Core.metrics().createTimer(String). This method will be removed in Mendix 11.
      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.
      Please use Core.metrics().createGauge(String). This method will be removed in Mendix 11.
      Gauges are arbitrary, persistent values.
      Returns:
      an object that contains different methods for setting gauge values
    • sets

      Deprecated.
      We don't support Sets anymore. This method will be removed in Mendix 11.
      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