Repository navigation
Description
Task
T-125· Milestone M10 — Evaluation · Size S · Priority P2 · Epic #10Implements NFR-OBS-001
Branch
ci/t-125-observability-profile-prometheus-grafana-compose— one task = one branch = one PR (doc 32 §6)
Summary
Add compose observability profile (Prometheus scraping API/orchestrator/workers, Grafana with provisioned datasource and a dashboard JSON: queue depth, run throughput, episode duration histogram, GP fit time, fallback count, SSE clients).
Context / motivation
Doc 21 §5.2 metrics catalogue; optional for users, invaluable for long experiments.
Scope
In scope
docker/observability/**; doc section in 30.
Implementation guidance
docker/observability/prometheus.yml: scrapeapi:8000/metrics(bearer token from a secret file when set) and the orchestrator/worker internal metrics ports (doc 21 §5.2) every 15 s;prom/prometheusandgrafana/grafana-osspinned by digest.- Grafana provisioning:
provisioning/datasources/prometheus.yaml,provisioning/dashboards/roboprobe.yaml,dashboards/roboprobe.jsonwith panels for runs/min by verdict, run duration p50/p95, queue depth, workers by status, selector propose time, GP fit time, episode RTF, infra errors by reason, API p95 by route, SSE clients. - Grafana bound to
127.0.0.1:${ROBOPROBE_GRAFANA_PORT:-3000}, anonymous viewer role, admin password from a secret file. make observabilitytarget and a doc 30 §1 entry.- Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff
PLR2004); public APIs typed (mypy strict) and documented.
Configuration keys
From the configuration reference (doc 27). Keys marked (new) must be added to the typed settings models and appear in the generated reference (T-003c).
observability.metrics_enabled- ROBOPROBE_GRAFANA_PORT (new, .env)
Acceptance criteria
-
make observabilityshows populated dashboards duringmake demo. -
promtool check configand a dashboard JSON lint in CI. - Every metric used in the dashboard exists in the registry (script cross-check).
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
- CI: promtool check config; dashboard JSON lint.
Dependencies
Blocked by: #24 (T-004b), #95 (T-048), #142 (T-080a)
Blocks: #215 (T-126)
Parallelization notes
Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:
docker/observability/**- docker/compose.yaml (observability block)
Infra-only.
Definition of Done
Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-125 (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.
References
Design docs: doc 21 §5.2 · doc 30 §1
Requirements: NFR-OBS-001 (traceability: doc 28)
External:
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
/meta,/metrics, request logging #142observability.tracing.enabled#215Add observability compose profile and optional OpenTelemetry tracing (C…