-
@Service() public final class ProcessorMetricsServiceWe keep track here of the amount of events processed over a certain amount of time. Axon has an axon-metrics module, which is great but does not include projections running on other nodes Since we use the TokenStore to peek at the indices, we can do that more accurately. While we're at it, we exposed it to the micrometer registry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classProcessorMetricsService.Measurement
-
Constructor Summary
Constructors Constructor Description ProcessorMetricsService(TokenProvider tokenProvider, Serializer serializer, EventStore eventStore)
-
Method Summary
Modifier and Type Method Description final UnitupdateMetrics()final StatisticsgetStatistics(ProcessorId id)final StatisticForSecondscalculateForTimeInSeconds(List<ProcessorMetricsService.Measurement> measurements, Long seconds, Long behind)-
-
Constructor Detail
-
ProcessorMetricsService
ProcessorMetricsService(TokenProvider tokenProvider, Serializer serializer, EventStore eventStore)
-
-
Method Detail
-
updateMetrics
@Scheduled(fixedRate = 2000.toLong(), initialDelay = 1000.toLong()) final Unit updateMetrics()
-
getStatistics
final Statistics getStatistics(ProcessorId id)
-
calculateForTimeInSeconds
final StatisticForSeconds calculateForTimeInSeconds(List<ProcessorMetricsService.Measurement> measurements, Long seconds, Long behind)
-
-
-
-