Interface MetricsRecorder

All Known Implementing Classes:
DefaultNoopMetricsRecorder, SimpleMetricsRecorder

public interface MetricsRecorder
  • Field Details

  • Method Details

    • increase

      default void increase(String metricName, String action, String type)
      Increase the counter for the given metric name, action and type
      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
    • increase

      void increase(String metricName, String action, String type, int count)
      Increase the counter for the given metric name, action and type
      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

      void executeWithTimer(String metricName, String jobType, Runnable methodToExecute)
      Execute the given runnable and measure the execution time

      Note: the provided runnable is executed synchronously

      Parameters:
      metricName - - the name of the metric
      jobType - - type of the job the metric is for
      methodToExecute - - the method to execute