Package org.imixs.workflow.engine
Class MetricService
- java.lang.Object
-
- org.imixs.workflow.engine.MetricService
-
@ApplicationScoped public class MetricService extends Object
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.2A 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
Fields Modifier and Type Field Description static String
METRIC_DOCUMENTS
static String
METRIC_TRANSACTIONS
static String
METRIC_WORKITEMS
-
Constructor Summary
Constructors Constructor Description MetricService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onDocumentEvent(DocumentEvent documentEvent)
DocumentEvent listener to generate a metric.void
onProcessingEvent(ProcessingEvent processingEvent)
ProcessingEvent listener to generate a metric.
-
-
-
Field Detail
-
METRIC_DOCUMENTS
public static final String METRIC_DOCUMENTS
- See Also:
- Constant Field Values
-
METRIC_WORKITEMS
public static final String METRIC_WORKITEMS
- See Also:
- Constant Field Values
-
METRIC_TRANSACTIONS
public static final String METRIC_TRANSACTIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
onProcessingEvent
public void onProcessingEvent(@Observes ProcessingEvent processingEvent) throws AccessDeniedException
ProcessingEvent listener to generate a metric.- Parameters:
processingEvent
-- Throws:
AccessDeniedException
-
onDocumentEvent
public void onDocumentEvent(@Observes DocumentEvent documentEvent) throws AccessDeniedException
DocumentEvent listener to generate a metric.- Parameters:
documentEvent
-- Throws:
AccessDeniedException
-
-