Class DefaultNoopMetricsRecorder
java.lang.Object
io.camunda.zeebe.spring.client.metrics.DefaultNoopMetricsRecorder
- All Implemented Interfaces:
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)
-
Field Summary
Fields inherited from interface io.camunda.zeebe.spring.client.metrics.MetricsRecorder
ACTION_ACTIVATED, ACTION_BPMN_ERROR, ACTION_COMPLETED, ACTION_FAILED, METRIC_NAME_JOB -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteWithTimer(String metricName, String jobType, Runnable methodToExecute) Execute the given runnable and measure the execution timevoidIncrease the counter for the given metric name, action and typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.spring.client.metrics.MetricsRecorder
increase
-
Constructor Details
-
DefaultNoopMetricsRecorder
public DefaultNoopMetricsRecorder()
-
-
Method Details
-
increase
Description copied from interface:MetricsRecorderIncrease the counter for the given metric name, action and type- Specified by:
increasein interfaceMetricsRecorder- Parameters:
metricName- - the name of the metricaction- - event type within the metric, e.g. activated, completed, failed, bpmn-errortype- - type of the job the metric is forcount- - the amount to increase the metric by
-
executeWithTimer
Description copied from interface:MetricsRecorderExecute the given runnable and measure the execution timeNote: the provided runnable is executed synchronously
- Specified by:
executeWithTimerin interfaceMetricsRecorder- Parameters:
metricName- - the name of the metricjobType- - type of the job the metric is formethodToExecute- - the method to execute
-