Observability & Telemetry

Observability & Grafana Dashboards

Every API route and agent execution in Orcha Agent OS is instrumented with Prometheus telemetry. Monitor request rates, p95 latencies, error ratios, and memory health in real time.

Overview

The monitoring stack (Prometheus & Grafana) is included in the standard docker-compose.yml file. Prometheus scrapes metrics from http://localhost:3000/api/metrics every 15 seconds, and Grafana exposes an auto-provisioned dashboard on port 3001.

Prometheus Configuration

Located in monitoring/prometheus.yml:

yaml
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: 'orcha-api'
    metrics_path: '/api/metrics'
    static_configs:
      - targets: ['host.docker.internal:3000']

Grafana Dashboards

Access the Grafana instance at http://localhost:3001 (default credentials: admin / admin). The Orcha API Routes dashboard is provisioned automatically with panels for:

Total Request Rate (RPS)
Total volume of queries flowing into /api/chat, /api/mcp, and /api/test-connection.
p95 / p99 Latency Histogram
Execution time breakdowns between LLM synthesis, WASM transpilation, and native DB execution.
5xx Server Error Ratio
Tracks database connection timeouts, syntax validation rejections, and rate-limit 429 events.
Process Heap & Memory
Tracks memory allocation across the Node.js runtime and Rust WebAssembly module.

Key Telemetry Metrics

orcha_http_requests_total{method, route, status} - Counter of HTTP calls
orcha_http_request_duration_seconds_bucket{route} - Latency distribution
orcha_db_query_duration_seconds{database_type} - Native database query latency
orcha_wasm_transpile_duration_seconds - Sub-second WASM formula transpilation time

Alerting & Thresholds

Configure alert rules in Grafana to send Slack, PagerDuty, or webhook notifications whenever p95 latency exceeds 2.5 seconds or 5xx error ratios cross 1% over a 5-minute window.