- Rust engine: real bootstrap/wiring preflight (guardrail-agent), execution layer (retry/router/pre-trade/post-trade/reconciliation), guardrail-doctor diagnostics with allowlist-drift guard. - guardrail-cli: extracted pure helpers into util.rs (split in progress). - 6 Track-2 skills + ensemble; python-lab analytics (regime/drawdown/montecarlo/dossier/ensemble/journal/seed); clients (ts/py/go/mcp/langchain/web-lite/proof-verifier); alert relay; scenarios; helm/k8s/compose; docs. - dashboard/vercel.json + docs/VERCEL_DEPLOY.md for Vercel deployment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guardrail Grafana
Provisioned Grafana assets for the Guardrail Alpha stack. Everything is
zero-touch: bringing up the monitoring Compose profile gives a Grafana that
already has the Prometheus data source wired and all dashboards loaded, no
manual clicking required.
Provisioning layout
infra/grafana/
├── dashboards/ # dashboard JSON (the actual panels)
│ ├── pnl.json
│ ├── trading-risk.json
│ ├── agent-health.json
│ └── alerts.json
├── provisioning/
│ ├── datasources/
│ │ └── datasource.yml # Prometheus datasource (default)
│ └── dashboards/
│ └── dashboards.yml # file provider that loads ../dashboards
└── README.md
How it is mounted by deploy/compose/docker-compose.full.yml (grafana service,
monitoring profile), all read-only:
| Host path | Container path | Purpose |
|---|---|---|
infra/grafana/provisioning |
/etc/grafana/provisioning |
datasource + dashboard provider configs (Grafana auto-loads every *.yml here on startup) |
infra/grafana/dashboards |
/var/lib/grafana/dashboards |
the dashboard JSON the file provider reads |
- Data source (
provisioning/datasources/datasource.yml): a single Prometheus data source withuid: prometheus, set as default and pointing at the Compose Prometheus servicehttp://prometheus:9090. The fixeduidis what every dashboard panel references, so the dashboards resolve their queries without any per-environment edits. - Dashboard provider (
provisioning/dashboards/dashboards.yml): afileprovider that scans/var/lib/grafana/dashboards(the mounteddashboards/dir) every 30s and loads each JSON into theGuardrail Alphafolder.
To add a dashboard, drop a new JSON file into dashboards/ — the provider picks
it up automatically; no datasource or compose change is needed.
Dashboards
| File | UID | Focus |
|---|---|---|
dashboards/pnl.json |
guardrail-pnl |
NAV, positions, trades, allocation |
dashboards/trading-risk.json |
guardrail-risk |
Drawdown, kill switch, risk rejections |
dashboards/agent-health.json |
guardrail-health |
Surface up/down, events, snapshot age |
dashboards/alerts.json |
guardrail-alerts |
Cross-cutting overview: NAV, drawdown, regime, alert counts, trade count |
Metric names
The exporter (apps/guardrail-exporter) currently exposes these gauges/counters,
all used directly by the dashboards:
guardrail_nav_usdguardrail_total_drawdown_pctguardrail_trades_totalguardrail_kill_switchguardrail_positionsguardrail_position_weight_pctguardrail_risk_rejections_totalguardrail_orders_proposed_totalguardrail_quotes_totalguardrail_daily_trade_satisfied_totalguardrail_events_totalguardrail_report_age_seconds
Placeholder metrics (alerts dashboard)
dashboards/alerts.json references two metrics that the exporter does not
emit yet. They are intentionally clearly named so that when the exporter starts
publishing them the panels light up with no dashboard edits. Until then those
two panels render "No data".
| Placeholder metric | Panel | What it represents | Where the data lives today |
|---|---|---|---|
guardrail_market_regime |
"Market Regime" | Numeric regime code (e.g. 0=calm, 1=volatile, 2=stress) |
Computed by the agent; not yet exported as a gauge |
guardrail_active_alerts{severity=...} |
"Active Alert Counts by Severity" | Count of currently-active alerts per severity | Surfaced by the API /alerts counts field and consumed by integrations/alert-relay; not yet exported to Prometheus |
To wire these up, add the two gauges to apps/guardrail-exporter (mirroring the
existing add_gauge/# HELP/# TYPE pattern) using exactly these names and, for
guardrail_active_alerts, a severity label of info / warning / critical.
Template variables
dashboards/alerts.json defines two template variables:
$datasource— selects the Prometheus data source (defaults toprometheus).$severity— filters the alert-count panel byinfo/warning/critical.