Skip to content

feat: expose gateway signer XLM balance as Prometheus gauge (Closes #29) - #69

Open
ZacLou wants to merge 4 commits into
StellarRoute:mainfrom
ZacLou:feat/issue-29-prometheus-xlm-gauge
Open

feat: expose gateway signer XLM balance as Prometheus gauge (Closes #29)#69
ZacLou wants to merge 4 commits into
StellarRoute:mainfrom
ZacLou:feat/issue-29-prometheus-xlm-gauge

Conversation

@ZacLou

@ZacLou ZacLou commented Aug 28, 2026

Copy link
Copy Markdown

Closes #29

Changes

Adds waveflow_gateway_signer_xlm_balance Prometheus gauge that queries the gateway signer's XLM balance from Horizon:

  • Config: Added HORIZON_URL and GATEWAY_PUBLIC_KEY env vars
  • Gauge function: update_signer_xlm_gauge() queries Horizon /accounts/{pubkey} and sets the gauge
  • Periodic update: Background tokio task runs every 5 minutes
  • Graceful degradation: Skips when GATEWAY_PUBLIC_KEY or HORIZON_URL not configured

Files changed

  • crates/shared/src/config.rs — Added horizon_url and gateway_public_key fields
  • crates/gateway/src/attestation.rs — Added update_signer_xlm_gauge() function
  • crates/gateway/src/main.rs — Spawns periodic gauge update task

Alerting use case

Monitor waveflow_gateway_signer_xlm_balance for low balance → the signer needs XLM to submit Soroban transactions.

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.

[gateway] Expose gateway signer XLM balance as Prometheus gauge

1 participant