Skip to content
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

Add L1 client metrics #2346

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Add L1 client metrics #2346

merged 2 commits into from
Dec 4, 2024

Conversation

jbearer
Copy link
Member

@jbearer jbearer commented Dec 2, 2024

Adds visibility into the L1 client. In retrospect these are the metrics we would have needed to automate monitoring for the issue we observed recently with stuck L1 clients on decaf. We can add alerts on consensus_l1_head increasing to catch issues like this faster in the future.

This PR:

Adds the following metrics to give visibility into the L1 client:

  • consensus_l1_head: the block number that the node thinks is the current L1 head
  • consensus_l1_finalized: the block number that the node thinks is the most recently finalized L1 block
  • consensus_l1_ws_reconnects: the number of times the node has had to reestablish a WebSockets connection
  • consensus_l1_stream_reconnects: the number of times the node has had to reestablish a blocks filter or subscription

Logs L1 RPC errors at RPC client layer. This ensures all errors get logged straight from the RPC, even if they are ultimately swallowed at a higher level (as in the Ethers FilterWatcher stream). This will give us much better insight into future problems with the L1.

This ensures all errors get logged straight from the RPC, even if they
are ultimately swallowed at a higher level (as in the Ethers `FilterWatcher`
stream). This will give us much better insight into future problems with
the L1.
@jbearer jbearer merged commit abf9a9b into main Dec 4, 2024
19 checks passed
@jbearer jbearer deleted the jb/l1-metrics branch December 4, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants