Routing & Resilience

Observability

Meridian Blue exposes a Prometheus scrape target, a health endpoint, and structured Conversation rows for every request. Wire them into your existing dashboards — no Meridian-specific stack required.

Health endpoint

GET /health is unauthenticated and returns liveness + database state. Use it as a Kubernetes liveness/readiness probe.

JSON
{
  "status": "Meridian Blue Server Online",
  "db": "connected",
  "ts": "2026-04-29T13:34:42.123Z"
}

Prometheus metrics

GET /metrics returns a standard Prometheus exposition (text/plain version 0.0.4). Add it to your Prometheus / Grafana Agent / Datadog Agent / Victoria Metrics scrape config.

YAML
scrape_configs:
  - job_name: meridian-blue
    scheme: https
    static_configs:
      - targets: ["api.meridianblue.ai"]
    metrics_path: /metrics

Available metrics

MetricTypeLabels
meridian_requests_totalcountermodel, provider, status
meridian_request_errors_totalcountermodel, provider, error_code
meridian_fallbacks_totalcountermodel, attempts
meridian_request_latency_mshistogrammodel, provider
meridian_tokens_totalcounterdirection (input/output)
meridian_credits_consumed_totalcountertenant
meridian_cost_usd_totalcounterprovider, model
meridian_active_connectionsgauge
meridian_provider_attempts_totalcounterprovider, model, status
meridian_risk_classifications_totalcounterrisk_level

Conversation log

Every successful request writes a Conversation row containing input/output content, token counts, total cost (in credits and USD), the provider attempt history, latency, and (when applicable) the coupon ID and discount amount. Query it via the dashboard's Conversations page or the GET /api/v1/developer/usage endpoint.

Audit log

Every authenticated non-GET request and every auth event (login / register / oauth / failed login) writes an ActivityLog row. Query via GET /api/v1/audit-logs with filters for userId, action, and time range. See Audit vault.

Access control

  • Conversations — users see their own; admins / owners see the whole tenant; auditors are read-only.
  • Audit log — admins, owners, and auditors can read. reviewer can read entries scoped to the human-review queue.
  • Metrics/metrics is unauthenticated by default. Put it behind your scrape proxy if you want to gate it.
  • Health — always public.