Makhzon 360 · RB-PUBLICAPI

Public API / API Key Service — incident runbook

Public API / API Key Service is monitored by Edge API monitor on API 5xx rate. It is owned by Integrations Team and serves the business services listed below. Use this runbook when an alert fires on this component.

Warning at API 5xx rate ≥ 1.5%, critical at ≥ 4%. Critical means user-visible impact: page the escalation owner.

dashboard: sim://grafana/public-apilogs: sim://logs/public-apiowner: Integrations Teamrunbook: RB-PUBLICAPI

Signals & thresholds

  • Primary metric: API 5xx rate (%)
  • Warning threshold: ≥ 1.5%
  • Critical threshold: ≥ 4%
  • Dashboard: sim://grafana/public-api
  • Log source: sim://logs/public-api
  • SLA: 99.5% monthly availability
  • SLO: 99.9% of requests under warning threshold
  • External dependencies: Lovable Cloud Runtime / Internet / DNS-TLS, Supabase PostgreSQL / APIs / Realtime

1. Detection

  1. Edge API monitor reports API 5xx rate above the warning threshold.
  2. Error volume for this component rises in the log source and error reports.

2. Triage

  1. Group recent errors in sim://logs/public-api by message and pick the dominant class.
  2. Determine whether errors are user-input related, permission related or infrastructure related.
  3. Check whether the failure is confined to one tenant, one flow or one release.
  4. Confirm whether upstream dependencies are healthy before treating this as a local defect.

3. Mitigation

  1. If a recent release correlates, roll it back.
  2. Disable the specific failing feature path with the feature flag if one exists.
  3. Queue and retry failed operations instead of discarding them.
  4. Communicate the affected flow to operators with a manual workaround where possible.

4. Verification

  1. Confirm API 5xx rate has been below the warning threshold for at least 10 minutes.
  2. Confirm the affected business services are healthy on the dashboard.
  3. Confirm no alerts remain open for this component and its downstream consumers.
  4. Spot-check one real end-to-end operation through the affected flow.

5. Rollback / restore

  1. If a deploy caused the incident, roll back to the previous release and re-verify.
  2. If a configuration or threshold change caused it, restore the previous value and record why.
  3. Re-enable any job, feature flag or channel that was paused during mitigation, one at a time.

Escalation path

  • First responder: NOC on duty — acknowledge within 5 minutes.
  • Component owner: Integrations Team.
  • Escalation owner (page on critical): Integrations Team.
  • Escalate if the metric is still critical 15 minutes after mitigation, or if data integrity is in doubt.
  • Declare a major incident if two or more critical components are alerting at the same time.

Blast radius — business services affected (3)

E-Commerce IntegrationDeveloper APIWebhooks

External dependencies

Lovable Cloud Runtime / Internet / DNS-TLS — Edge runtime, DNS resolution and TLS termination

Supabase PostgreSQL / APIs / Realtime — Primary data plane, RPC and realtime channels

Simulated incidents that exercise this runbook

Application runtime 5xx spike — Edge runtime returning 5xx for a subset of routes.

E-commerce sync degradation — Channel adapters throttled; stock sync lag growing.

Reporting notes

  • Record start time, actions taken and recovery time in the incident record.
  • Attach the dashboard screenshot and the dominant error message to the postmortem.
  • Content drafted for the monitoring demo — confirm the exact commands with the owning team before production use.