You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(metrics): track blocks synchronized by source (#3259)
* feat(metrics): track blocks synchronized by source
Add sequencer_blocks_synchronized_total counter with source label (DA/P2P) to track how many blocks were synced from each source.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(changelog): add entry for blocks_synchronized_total metric
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(changelog): fix PR number for blocks_synchronized_total metric
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(metrics): guard BlocksSynchronized lookup and move after commit
- Use nil-safe map lookup to avoid panic when RecoverFromRaft calls
trySyncNextBlockWithState with Source: "" (not in the map)
- Move counter increment to after batch.Commit() so only successfully
committed blocks are counted
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(metrics): address code review feedback
- Lowercase EventSource constant values (da/p2p/raft) for Prometheus label convention
- Add SourceRaft for RecoverFromRaft path so blocks are counted
- Add AllEventSources() helper to avoid duplicating source list in metrics.go
- Use AllEventSources() in both PrometheusMetrics and NopMetrics init loops
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments