Skip to content

feat(tools): add Prometheus exporter for RustChain nodes (closes #2000)#7868

Open
lequangsang01 wants to merge 1 commit into
Scottcjn:mainfrom
lequangsang01:feat/bounty-2000
Open

feat(tools): add Prometheus exporter for RustChain nodes (closes #2000)#7868
lequangsang01 wants to merge 1 commit into
Scottcjn:mainfrom
lequangsang01:feat/bounty-2000

Conversation

@lequangsang01

Copy link
Copy Markdown
Contributor

Summary

Closes #2000

Changes

  • Added tools/prometheus-exporter/ directory with a standalone Prometheus exporter
  • Python script scrapes RustChain node RPC and exposes metrics in Prometheus format
  • Per-miner antiquity multiplier metrics with miner label
  • Configurable via environment variables (node URL, port, scrape interval)

Metrics Exposed

Metric Type Description
rustchain_node_up gauge Node reachability
rustchain_node_version_info info Node version
rustchain_epoch gauge Current epoch
rustchain_miners_total gauge Total miners
rustchain_miners_active gauge Active miners
rustchain_miner_antiquity_multiplier gauge Per-miner multiplier
rustchain_last_scrape_timestamp gauge Last scrape time

Testing

  • Added test suite (test_exporter.py) covering /metrics and /health endpoints
  • Tests verify Prometheus format compliance and per-miner metric rendering

@github-actions github-actions Bot added documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/L PR: 201-500 lines labels Jul 3, 2026
@lequangsang01

Copy link
Copy Markdown
Contributor Author

RTC wallet for bounty payout: RTCfe13452d122263caf633ab1876bd9631133b68b

@jaxint jaxint left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

Reviewed this PR for RustChain bounty program.

Key observations:

  • PR addresses: feat(tools): add Prometheus exporter
  • Changes appear reasonable and aligned with project goals
  • Documentation and tests look adequate

Thank you for the contribution!


Wallet: AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) documentation Improvements or additions to documentation size/L PR: 201-500 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOUNTY] rustchain-prometheus-exporter — Prometheus metrics for RustChain node

2 participants