Class MicrometerMetricsRecorder
java.lang.Object
io.camunda.spring.client.actuator.MicrometerMetricsRecorder
- All Implemented Interfaces:
MetricsRecorder
-
Field Summary
Fields inherited from interface io.camunda.spring.client.metrics.MetricsRecorder
ACTION_ACTIVATED, ACTION_BPMN_ERROR, ACTION_COMPLETED, ACTION_FAILED, METRIC_NAME_JOB -
Constructor Summary
ConstructorsConstructorDescriptionMicrometerMetricsRecorder(io.micrometer.core.instrument.MeterRegistry meterRegistry) -
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 typeprotected io.micrometer.core.instrument.CounternewCounter(String metricName, String action, String jobType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.spring.client.metrics.MetricsRecorder
increase
-
Constructor Details
-
MicrometerMetricsRecorder
public MicrometerMetricsRecorder(io.micrometer.core.instrument.MeterRegistry meterRegistry)
-
-
Method Details
-
newCounter
-
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
-