Beacon

Observability API

View as Markdown

Observability API

Health, metrics, and alerts endpoints for continuous operations.

reference • updated 2026-03-15

Goal

Provide operational visibility across platform health, fiscal throughput, and alert conditions for fast incident response.

Primary endpoints

EndpointUsageRecommended cadence
GET /v1/healthglobal service availabilitycontinuous checks every 30s-60s
GET /v1/metrics/fiscalfiscal throughput and error metricshourly reviews and dashboards
POST /v1/alertscreate/trigger operational alertswhen thresholds are crossed

Minimum metrics taxonomy

  • Availability: success rate for critical endpoints.
  • Latency: p95/p99 for checkout, webhook processing, and fiscal issuance.
  • Backlog: pending events/documents per organization.
  • Quality: retry ratio, error classes, and mean time to recovery.

Health read example

bash
curl -X GET https://api.beacon.pt/v1/health \
  -H "Authorization: Bearer <access_token>"
json
{
  "ok": true,
  "timestamp": "2026-03-15T10:15:00Z",
  "services": {
    "billing": "up",
    "webhooks": "up",
    "fiscal": "up"
  }
}

Alert policy

  • Define thresholds per environment (test, live) and severity (P1/P2/P3).
  • Route alerts to explicit operational owners.
  • Link each alert to a runbook and closure criteria.

Operational best practices

  • Do not mute alerts without incident context.
  • Review noise vs. coverage weekly.
  • Correlate alert spikes with deploy windows and configuration changes.