Package org.imixs.archive.service
Class MetricService
- java.lang.Object
-
- org.imixs.archive.service.MetricService
-
@ApplicationScoped public class MetricService extends Object
The Imixs MetricSerivce is a monitoring resource for Imixs-Archive in the prometheus format. The MetricService is based on Microprofile 2.2 and MP-Metric-API 2.2A metric is created each time when an ArchiveEvent is fired. The service exports metrics in prometheus text format.
The service provides counter metrics. 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.
- Version:
- 1.0
- Author:
- rsoika
-
-
Field Summary
Fields Modifier and Type Field Description static StringMETRIC_DOCUMENTS
-
Constructor Summary
Constructors Constructor Description MetricService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonArchiveEvent(ArchiveEvent archiveEvent)ProcessingEvent listener to generate a metric.
-
-
-
Field Detail
-
METRIC_DOCUMENTS
public static final String METRIC_DOCUMENTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
onArchiveEvent
public void onArchiveEvent(@Observes ArchiveEvent archiveEvent) throws org.imixs.workflow.exceptions.AccessDeniedExceptionProcessingEvent listener to generate a metric.- Parameters:
archiveEvent-- Throws:
org.imixs.workflow.exceptions.AccessDeniedException
-
-