Context
Visibility is non-negotiable for a live bot. Prometheus + Grafana is self-hosted, zero marginal cost, and integrates with every standard alerting tool. This issue covers the exposition side; the Grafana dashboards are part of the deploy issue.
Scope
- Create
crates/charon-telemetry/ crate
/metrics HTTP endpoint on a configurable port (default 9090)
- Counters:
charon_liquidations_total, charon_liquidation_failures_total, charon_scans_total
- Gauges:
charon_positions_tracked, charon_latest_block, charon_chain_ws_connected
- Histograms:
charon_scan_duration_seconds, charon_build_duration_seconds
- Labels:
chain, protocol, bucket (healthy / near-liq / liquidatable)
prometheus crate (or metrics + metrics-exporter-prometheus)
Acceptance criteria
References
- PRD section 7a (Telemetry & Alerting)
Context
Visibility is non-negotiable for a live bot. Prometheus + Grafana is self-hosted, zero marginal cost, and integrates with every standard alerting tool. This issue covers the exposition side; the Grafana dashboards are part of the deploy issue.
Scope
crates/charon-telemetry/crate/metricsHTTP endpoint on a configurable port (default9090)charon_liquidations_total,charon_liquidation_failures_total,charon_scans_totalcharon_positions_tracked,charon_latest_block,charon_chain_ws_connectedcharon_scan_duration_seconds,charon_build_duration_secondschain,protocol,bucket(healthy / near-liq / liquidatable)prometheuscrate (ormetrics+metrics-exporter-prometheus)Acceptance criteria
curl localhost:9090/metricsreturns Prometheus-formatted textlistenrunReferences