-
Notifications
You must be signed in to change notification settings - Fork 42
Add Prometheus /metrics endpoint #39
Copy link
Copy link
Closed
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programarea:indexerEvent ingestionEvent ingestiondifficulty:intermediate~half a day~half a dayhelp wantedExtra attention is neededExtra attention is neededpoints:150Medium tier — 150 Wave pointsMedium tier — 150 Wave points
Description
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programarea:indexerEvent ingestionEvent ingestiondifficulty:intermediate~half a day~half a dayhelp wantedExtra attention is neededExtra attention is neededpoints:150Medium tier — 150 Wave pointsMedium tier — 150 Wave points
Background
Wraith runs as a persistent background service but exposes no operational metrics. When the indexer stalls or RPC calls start failing, there is no automated way to detect it. A Prometheus
/metricsendpoint enables dashboards and automated alerting.What to build
Add
GET /metricsexposing Prometheus counters and gauges: ledgers indexed, transfers stored, RPC errors, last indexed ledger, DB query latency.Key files
src/server.ts— register the metrics routesrc/metrics.ts— create this module usingprom-clientsrc/indexer.ts— increment counters hereSuggested execution
npm install prom-clientsrc/metrics.ts— define:ledgers_indexed_total(counter),transfers_stored_total(counter),rpc_errors_total(counter),last_indexed_ledger(gauge),db_query_duration_seconds(histogram)GET /metricsreturning Prometheus text format/statusto includelast_indexed_ledgeras JSONExample commit message:
feat(indexer): add Prometheus /metrics endpoint with indexer and transfer countersAcceptance criteria
GET /metricsreturns valid Prometheus text format/statusupdated to includelast_indexed_ledgerRequired: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk