Skip to content

docs: add production incident runbooks (#287) - #344

Open
i-amdaveee wants to merge 1 commit into
Pidoko257:mainfrom
i-amdaveee:runbook/production-issue
Open

docs: add production incident runbooks (#287)#344
i-amdaveee wants to merge 1 commit into
Pidoko257:mainfrom
i-amdaveee:runbook/production-issue

Conversation

@i-amdaveee

@i-amdaveee i-amdaveee commented Jul 30, 2026

Copy link
Copy Markdown

closes #287

Create Runbook for Common Production Issues (#287)

Adds docs/runbooks/ — an index plus 10 incident runbooks for the most common production incidents on the ProxyPay bridge. Covers deposit/withdraw path, provider, data-tier, and financial-integrity failures.

What's included

# Runbook Trigger
01 Mobile money provider down Circuit breaker open, payout failures
02 Database index bloat & slow queries Rising query latency, slow_query logs
03 High API latency P99 http_request_duration_seconds breach
04 Queue backlog total_depth high, KEDA at max replicas
05 Redis outage / failover /ready shows Redis down, cache/queue impact
06 Stellar Horizon degradation horizon_node_health=0
07 DB connection pool exhaustion too many clients, /ready DB check failing
08 Read-replica lag db_replica_lag_seconds high, stale reads
09 Ledger imbalance reconcile:ledger reports debits ≠ credits
10 Elevated error rate (incl. traffic spike) Error-rate alert, transaction_errors_total spike

Each runbook follows the same structure — symptoms → diagnose → mitigate → recover → verify → post-incident — and is command-driven rather than prose.

Grounded in the actual codebase

Not generic templates. Every command, metric, and endpoint references real project internals:

  • Metrics from src/utils/metrics.ts (provider_circuit_breaker_state, horizon_node_health, db_replica_lag_seconds, …)
  • Endpoints from src/index.ts (/ready, /health/queue/depth, /metrics)
  • Scripts from package.json (reconcile:ledger, reindex:bloated-indexes, audit:indexes)
  • Scaling config from k8s/ (KEDA threshold 20, HPA 80% CPU / min 2 max 10)
  • Log queries from docs/observability.md (Grafana/Loki LogQL)
  • Runbook 09's diagnostic SQL matches the real ledger_entries schema (debit_amount/credit_amount)

Discoverability

Linked from docs/BRIDGE_DOCUMENTATION_INDEX.md and a new Operations section in README.md.

Acceptance criteria

  • Runbooks cover top 10 incidents
  • Include diagnosis steps
  • Links to relevant metrics/dashboards
  • Example commands
  • Added to docs
  • Tested by team — needs a human walkthrough against a real or simulated incident

Notes

Docs-only change; no code touched. Cross-links verified to resolve.

Add docs/runbooks/ with an index plus 10 incident runbooks covering the
top production issues: provider down, database index bloat, high API
latency, queue backlog, Redis outage, Horizon degradation, DB pool
exhaustion, replica lag, ledger imbalance, and elevated error rate.

Each runbook is command-driven (symptoms -> diagnose -> mitigate ->
recover -> verify -> post-incident) and grounded in the real codebase:
metric names from src/utils/metrics.ts, health/metrics endpoints from
src/index.ts, scripts from package.json, KEDA/HPA thresholds from k8s/,
and the Grafana/Loki queries in docs/observability.md.

Linked from docs/BRIDGE_DOCUMENTATION_INDEX.md and README.md.
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@i-amdaveee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Create Runbook for Common Production Issues

1 participant