Class DefaultNoopMetricsRecorder

java.lang.Object
io.camunda.spring.client.metrics.DefaultNoopMetricsRecorder
All Implemented Interfaces:
MetricsRecorder

public class DefaultNoopMetricsRecorder extends Object implements MetricsRecorder
Default implementation for MetricsRecorder simply ignoring the counts. Typically, you will replace this by a proper Micrometer implementation as you can find in the starter module (activated if Actuator is on the classpath)
  • Constructor Details

    • DefaultNoopMetricsRecorder

      public DefaultNoopMetricsRecorder()
  • Method Details

    • 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