Closes docs/THREAT-MODEL.md Known-gaps #3's named TODO: ledger-core had no Prometheus endpoint at all, so a sustained audit-log outage was only a tracing::warn! log line, nothing alertable. Adds ledger_core_audit_mirror_spawn_append_failures_total{kind}, served on GET /metrics at LEDGER_CORE_METRICS_ADDR (default localhost:9099), pre-registered at zero per kind so absence vs zero is distinguishable. Wires the new endpoint into docker-compose.yml and the Prometheus scrape config, which already named this exact gap as the trigger to add the target. Fixes a render() visibility bug and a test assumption that unobserved CounterVec label values still emit TYPE/HELP lines, both left broken by an earlier interrupted pass on this same change.
56 lines
2.1 KiB
YAML
56 lines
2.1 KiB
YAML
# Prometheus scrape config for Ration's local observability stack —
|
|
# docs/SCALE-EXPANSION.md section 2.
|
|
#
|
|
# Scrapes every Go service's own /metrics endpoint (pkg/metrics) directly
|
|
# — metrics never flow through infra/otel-collector (that collector only
|
|
# carries traces; see its config.yaml's top comment). Target hostnames
|
|
# match docker-compose.yml's service names; when running outside
|
|
# docker-compose (e.g. `prometheus --config.file=...` on a dev laptop
|
|
# with every service started via `make run-*`), replace each target with
|
|
# "localhost:<port>" instead.
|
|
#
|
|
# ledger-core (Rust) now exposes a /metrics endpoint too
|
|
# (services/ledger-core/src/metrics.rs), scoped to the single counter
|
|
# docs/THREAT-MODEL.md's "Known gaps" #3 names
|
|
# (ledger_core_audit_mirror_spawn_append_failures_total); the broader
|
|
# per-RPC request/latency instrumentation the Go services have is a
|
|
# separate, still-open TODO (docs/SLO.md's "ledger-core" section).
|
|
|
|
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
|
|
scrape_configs:
|
|
# The collector's own health/throughput metrics (spans received,
|
|
# dropped, queue depth) — standard practice for any OTel deployment,
|
|
# and the fastest way to tell "is the collector itself healthy" apart
|
|
# from "is a service failing to export".
|
|
- job_name: otel-collector
|
|
static_configs:
|
|
- targets: ["otel-collector:8888"]
|
|
|
|
- job_name: ledger-core
|
|
static_configs:
|
|
- targets: ["ledger-core:9099"]
|
|
|
|
- job_name: gateway
|
|
static_configs:
|
|
- targets: ["gateway:9091"]
|
|
|
|
- job_name: audit-log
|
|
static_configs:
|
|
- targets: ["audit-log:9092"]
|
|
|
|
- job_name: agent
|
|
static_configs:
|
|
- targets: ["agent:9093"]
|
|
|
|
# tui runs behind docker-compose.yml's "tools" profile (an interactive
|
|
# operator tool, not a standing service) — this target is intentionally
|
|
# present so tui's metrics are scraped whenever it IS running
|
|
# (`docker compose run --rm tui`), and shows as "down" the rest of the
|
|
# time, which is the correct, expected state for an on-demand tool.
|
|
- job_name: tui
|
|
static_configs:
|
|
- targets: ["tui:9094"]
|