Skip to content
This repository was archived by the owner on Sep 15, 2026. It is now read-only.

is committer live metric - #300

Merged
nischitpra merged 1 commit into
mainfrom
np/committer_live_metridc
Oct 27, 2025
Merged

nischitpra merged 1 commit into
mainfrom
np/committer_live_metridc

Conversation

@nischitpra

@nischitpra nischitpra commented Oct 27, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added configurable committer liveness monitoring metric to track system health. The metric supports filtering by project name and chain identifier when enabled.

@coderabbitai

coderabbitai Bot commented Oct 27, 2025 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new Prometheus gauge metric CommitterIsLive to track committer liveness status. Integrates metric update into block publishing logic, setting it to 1 when the config flag is enabled and blocks are successfully published.

Changes

Cohort / File(s) Summary
CommitterIsLive Metric Implementation
internal/metrics/metrics.go
Defines new Prometheus GaugeVec metric CommitterIsLive with labels project_name and chain_id to measure committer liveness
CommitterIsLive Metric Usage
internal/committer/poollatest.go
Adds metric update logic that sets CommitterIsLive to 1 after publishing a batch of blocks and updating the next block number, gated behind config.Cfg.CommitterIsLive flag

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Straightforward metric addition with no complex logic or control-flow changes
  • Single metric definition and single metric observation point
  • Standard Prometheus pattern usage
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch np/committer_live_metridc

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 821798a and f77885b.

📒 Files selected for processing (2)
  • internal/committer/poollatest.go (1 hunks)
  • internal/metrics/metrics.go (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@nischitpra
nischitpra merged commit 98849e3 into main Oct 27, 2025
4 of 5 checks passed
@nischitpra
nischitpra deleted the np/committer_live_metridc branch October 27, 2025 12:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant