-
Notifications
You must be signed in to change notification settings - Fork 388
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
Expose metrics for sequence indexing cursor progress #4715
Comments
can you assign me? |
@RajVerma97 sure thing! The approximate scope I assigned is |
got it |
i am having issues in running the project locally |
please read the "working on hyperlane" section of the monorepo README. For further questions, join the discord and ask the community for help. https://github.com/hyperlane-xyz/hyperlane-monorepo#working-on-hyperlane |
@RajVerma97 sorry I won't be able to provide too much support here, have you been able to make progress? |
sorry i wasnt able to move forward |
On it 🫡 |
Context
Sequenced events like
HyperlaneMessage
andMerkleTreeInsertion
are indexed using a forward-backward cursor which is initialized to the sequence number at the blockchain tip, when the agent is started.For instance, if the last
HyperlaneMessage
had nonce 123, the forward-backward cursor would instantiate:index.from
)Problem
When an RPC becomes healthy after an outage, it's hard to know if agents are making any progress indexing the missed events over that period. If they're running but not making any progress, the RPC may still be having issues. The only way to know this is by checking raw logs, which requires knowledge of what to look for.
Suggested Solution
A simple way to provide better observability here is to have some new Prometheus metrics for indexed events:
To continue with the
HyperlaneMessage
example, the metrics at a random point for a given chain would look something like:cursor_current_block{eventType: 'HyperlaneMessage', cursorType: 'ForwardSequenced'}: 118000
cursor_current_sequence{eventType: 'HyperlaneMessage', cursorType: 'ForwardSequenced'}: 240
cursor_current_block{eventType: 'HyperlaneMessage', cursorType: 'BackwardSequenced'}: 91021
cursor_current_sequence{eventType: 'HyperlaneMessage', cursorType: 'BackwardSequenced'}: 82
cursor_max_sequence{eventType: 'HyperlaneMessage'}: 345
Based on this, it will be much easier to have dashboard showing the indexing progress agents make after each RPC rotation and restart, per indexed event and chain.
The text was updated successfully, but these errors were encountered: