AxonIQ/axon-server-se

Expose event processor status in metrics

hakvroot opened this issue · 0 comments

Issue

To determine the overall health of AxonServer and the event processing applications there are quite a large number of metrics available. Unfortunately we find that one of the key indicators for health, the ability to process events, is not completely covered in the metrics. This gap pertains the insight into unclaimed segments and duplicate segment claims.

Currently this information is available (in the AxonServer UI) through the AxonServer REST API under /v1/components/<component>/processors?context=<context> which describes the state per event processor.

Proposed solution

Based on the API we propose adding the following metrics (gauges) to AxonServer :

# per segment
axon_eventProcessor_segment_position{context=<>, component=<>, tokenStoreIdentifier=<>, processorName=<>, clientId=<>, segmentId=<>}=<position>
axon_eventProcessor_segment_onePartOf{context=<>, component=<>, tokenStoreIdentifier=<>, processorName=<>, clientId=<>, segmentId=<>}=<onePartOf>
axon_eventProcessor_segment_replaying{context=<>, component=<>, tokenStoreIdentifier=<>, processorName=<>, clientId=<>, segmentId=<>}=<0
1>
axon_eventProcessor_segment_caughtUp{context=<>, component=<>, tokenStoreIdentifier=<>, processorName=<>, clientId=<>, segmentId=<>}=<0
1>

# per processor
axon_eventProcessor_activeThreads{context=<>, component=<>, tokenStoreIdentifier=<>, processorName=<>}=<activeThreads>