@ApplicationScoped public class MetricService extends Object
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
| Modifier and Type | Field and Description |
|---|---|
static String |
METRIC_DOCUMENTS_TOTAL |
static String |
METRIC_WORKITEMS_TOTAL |
| Constructor and Description |
|---|
MetricService() |
| Modifier and Type | Method and Description |
|---|---|
void |
onDocumentEvent(DocumentEvent documentEvent)
DocumentEvent listener to generate a metric.
|
void |
onProcessingEvent(ProcessingEvent processingEvent)
ProcessingEvent listener to generate a metric.
|
public static final String METRIC_DOCUMENTS_TOTAL
public static final String METRIC_WORKITEMS_TOTAL
public void onProcessingEvent(@Observes
ProcessingEvent processingEvent)
throws AccessDeniedException
processingEvent - AccessDeniedExceptionpublic void onDocumentEvent(@Observes
DocumentEvent documentEvent)
throws AccessDeniedException
documentEvent - AccessDeniedExceptionCopyright © 2006–2020 Imixs Software Solutions GmbH. All rights reserved.