-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cursor metrics #4892
base: main
Are you sure you want to change the base?
feat: cursor metrics #4892
Conversation
|
Read the issue again and I thought to refactor the metrics to be cursor generic due to this requirement set by @daniel-savu Initially seems like it would be not necessary due to the But this makes it cleaner in my opinion and when/if the internal Grafana dashboards would be migrated to the new metric, Now with the Additionally, since the implementation of |
/// Labels: | ||
/// - `event_type`: the event type the cursor is indexing. Could be anything implementing `Indexable`. | ||
/// - `chain`: Chain the cursor is collecting data from. | ||
/// - `cursor_type`: The type of cursor. E.g. `forward_sequenced`, `backward_sequenced`, `forward_rate_limited` or `backward_rate_limited`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if values forward_rate_limited
and backward_rate_limited
are valid for this metric?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forward_rate_limited
is indeed valid as it's the only mode for the RateLimitedCursor, as seen here
backward_rate_limited
removed in both occurrences.
rust/main/hyperlane-base/src/contract_sync/cursors/rate_limited.rs
Outdated
Show resolved
Hide resolved
…d.rs Co-authored-by: Danil Nemirovsky <[email protected]>
Description
Adds metrics to ForwardBackward cursor in order to be able to monitor sync progress more effectively.
Introduced metrics
cursor_current_block
: Which block is the forward and backward cursor indexing currently for each eventExample above shows all event average
cursor_current_sequence
: Which sequence is the cursor currently on for a specific eventAs in the graph for Base above, we can see that the Forward cursor only begins showing data if there are new events to index since agent launch
cursor_max_sequence
: The max sequence the cursor can reachRelated issues
Backward compatibility
Yes
Testing
Manual