Package org.imixs.workflow.engine
Class MetricService
java.lang.Object
org.imixs.workflow.engine.MetricService
The Imixs MetricSerivce is a monitoring resource for Imixs-Workflow in the
prometheus format. The MetricService is based on Microprofile 2.2 and
MP-Metric-API 2.2
A metric is created each time when a Imixs ProcessingEvent or Imixs DocumentEvent is fired. The service exports metrics in prometheus text format.
The service provides counter metrics for document access and processed workitems. A counter will always increase. To extract the values in prometheus use the rate function - Example:
rate(http_requests_total[5m])
The service expects MP Metrics v2.0. A warning is logged if corresponding version is missing.
To enable the metric service the imixs.property ... must be set to true
- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onDocumentEvent
(DocumentEvent documentEvent) DocumentEvent listener to generate a metric.void
onProcessingEvent
(ProcessingEvent processingEvent) ProcessingEvent listener to generate a metric.
-
Field Details
-
METRIC_DOCUMENTS
- See Also:
-
METRIC_WORKITEMS
- See Also:
-
METRIC_TRANSACTIONS
- See Also:
-
-
Constructor Details
-
MetricService
public MetricService()
-
-
Method Details
-
onProcessingEvent
public void onProcessingEvent(@Observes ProcessingEvent processingEvent) throws AccessDeniedException ProcessingEvent listener to generate a metric.- Parameters:
processingEvent
-- Throws:
AccessDeniedException
-
onDocumentEvent
DocumentEvent listener to generate a metric.- Parameters:
documentEvent
-- Throws:
AccessDeniedException
-