Skip to content

feat: Add Prometheus metrics to wallet service#191

Merged
macterra merged 3 commits intomainfrom
190-wallet-metrics
Mar 11, 2026
Merged

feat: Add Prometheus metrics to wallet service#191
macterra merged 3 commits intomainfrom
190-wallet-metrics

Conversation

@macterra
Copy link
Copy Markdown
Collaborator

Summary

  • Add domain-specific Prometheus metrics to the wallet service, polled every 60s
  • Balance: wallet_balance_confirmed_btc, wallet_balance_unconfirmed_btc
  • UTXOs: wallet_utxo_count
  • Fees: wallet_fee_estimate_sat_per_vb (converted from BTC/kB)
  • Network: wallet_bitcoind_block_height
  • Status: wallet_setup_status (1=ready, 0=not ready)
  • Sends: wallet_sends_total counter with status=success|failed label (send + anchor endpoints)

Closes #190

Test plan

  • Verify /metrics endpoint returns all new gauges
  • Confirm balance/UTXO/fee/block height update every 60s
  • Send a transaction and verify wallet_sends_total{status="success"} increments
  • Start without bitcoind and verify wallet_setup_status is 0

🤖 Generated with Claude Code

macterra and others added 3 commits March 10, 2026 22:20
Add domain-specific metrics polled every 60s:
- wallet_balance_confirmed_btc / wallet_balance_unconfirmed_btc
- wallet_utxo_count
- wallet_fee_estimate_sat_per_vb
- wallet_bitcoind_block_height
- wallet_setup_status
- wallet_sends_total (counter with status label, incremented on send/anchor)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Wallet Service row to the Satoshi Mediator mainnet dashboard:
- Wallet Status stat (ready/not ready with version)
- Confirmed Balance stat (BTC, 8 decimals)
- UTXO Count stat
- Fee Estimate stat (sat/vB with color thresholds)
- Balance time series (confirmed + unconfirmed)
- Fee Estimate time series
- UTXO Count time series
- Send Operations time series (success/failed)

Also adds btc-mainnet-wallet scrape job to prometheus.yml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@macterra macterra merged commit e23479b into main Mar 11, 2026
13 checks passed
@macterra macterra deleted the 190-wallet-metrics branch March 11, 2026 02:48
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.

Add Prometheus metrics to wallet service

1 participant