Class MicrometerMetricsRecorder

java.lang.Object
io.camunda.zeebe.spring.client.actuator.MicrometerMetricsRecorder
All Implemented Interfaces:
MetricsRecorder

public class MicrometerMetricsRecorder extends Object implements MetricsRecorder
  • Constructor Details

    • MicrometerMetricsRecorder

      public MicrometerMetricsRecorder(io.micrometer.core.instrument.MeterRegistry meterRegistry)
  • Method Details

    • newCounter

      protected io.micrometer.core.instrument.Counter newCounter(String metricName, String action, String jobType)
    • increase

      public void increase(String metricName, String action, String type, int count)
      Description copied from interface: MetricsRecorder
      Increase the counter for the given metric name, action and type
      Specified by:
      increase in interface MetricsRecorder
      Parameters:
      metricName - - the name of the metric
      action - - event type within the metric, e.g. activated, completed, failed, bpmn-error
      type - - type of the job the metric is for
      count - - the amount to increase the metric by
    • executeWithTimer

      public void executeWithTimer(String metricName, String jobType, Runnable methodToExecute)
      Description copied from interface: MetricsRecorder
      Execute the given runnable and measure the execution time

      Note: the provided runnable is executed synchronously

      Specified by:
      executeWithTimer in interface MetricsRecorder
      Parameters:
      metricName - - the name of the metric
      jobType - - type of the job the metric is for
      methodToExecute - - the method to execute