Capture per-entity metrics on Repository and EventStore#155
Open
stefanmirkovic wants to merge 3 commits into
Open
Capture per-entity metrics on Repository and EventStore#155stefanmirkovic wants to merge 3 commits into
stefanmirkovic wants to merge 3 commits into
Conversation
EntityMetricsRegistry shipped on each StatisticReport. Repository decorator records load timings; event-store decorator attributes commit time, stream size and criteria size via CurrentEntityContext on the ProcessingContext. Count timers use higher precision and skip recording zero.
|
CodeDrivenMitch
approved these changes
May 28, 2026
Collaborator
CodeDrivenMitch
left a comment
There was a problem hiding this comment.
Looks good to me. However, check and update the copyright headers before merging!
| @@ -0,0 +1,24 @@ | |||
| /* | |||
| * Copyright (c) 2022-2025. AxonIQ B.V. | |||
Collaborator
There was a problem hiding this comment.
The copyright notice is outdated. Should be 2026. Are you using the copyright plugin with the templte?
| @@ -0,0 +1,30 @@ | |||
| /* | |||
| * Copyright (c) 2022-2025. AxonIQ B.V. | |||
Collaborator
There was a problem hiding this comment.
Same, copyright issue
Collaborator
There was a problem hiding this comment.
Please check the entire PR before merging
CodeDrivenMitch
requested changes
May 28, 2026
Collaborator
CodeDrivenMitch
left a comment
There was a problem hiding this comment.
Please see my comment on the backend PR about metric identifier conventions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds EntityMetricsRegistry that aggregates load rate, creation rate, total load time, event commit time, event stream size, and event criteria size per entity load identifier, shipped on every StatisticReport. A repository decorator records load and loadOrCreate timings and only registers a creation when the event store sourced zero events - so redeem/update commands on existing entities aren't double-counted as creations. An event-store decorator attributes commit time, stream size, and criteria size to the active entity via CurrentEntityContext and a shared AtomicLong that the streaming wrapper bumps for each sourced event. Count-style timers use higher percentile precision and skip recording zero so the Inspector UI shows clean integer counts instead of 0.98 / 0.99 bucket artifacts.
Relates: https://github.com/AxonIQ/axoniq-platform/pull/644