Skip to content

Conversation

@KatyaRyazantseva
Copy link
Collaborator

This PR adds new metrics to improve observability of node lifecycle, sync status, reorg and finalization events.

New Metrics

Node Info Metrics

  • lean_node_info (gauge) - node metadata including name and version
  • lean_node_start_time_seconds (Gauge) - node start timestamp

Sync Status Metrics

  • lean_node_sync_status (gauge) - synchronization status

Fork Choice Metrics

  • lean_fork_choice_reorgs_total (counter) - total number of fork choice reorgs
  • lean_fork_choice_reorg_depth (histogram) distribution of reorg depths

Finalization Metrics

  • lean_finalizations_total (counter) - total finalization attempts by result

@unnawut
Copy link
Contributor

unnawut commented Dec 24, 2025

Maybe we'd like to know the attestation target too? To see what each validator tries to justify


| Name | Type | Usage | Sample collection event | Labels | Lantern | Qlean | Ream | Zeam |
|--------|-------|-------|-------------------------|--------|----------|----------|----------|----------|
| `lean_node_sync_status` | Gauge | Current sync status (always 1) | On sync status change | status=not_started,syncing,synced,stalled |||||
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear what is the difference between synced, syncing, and stalled.
E.g. if we are on the top of the chain are we synced or syncing (waiting for a new block).
Also how do we define stalled?

If by sync we mean initial sync after the node is started, then it all makes more sense, but we need to write somewhere that this is initial sync

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.

3 participants