Metrics
How Prelude Collector exposes runtime pipeline metrics — internal JSON snapshot served by the API and UI.
Prelude Collector tracks runtime pipeline metrics — internal
counters and gauges that describe what the collector itself is doing
(messages received, drops by reason, channel saturation, goroutines,
allocated memory). These are kept in an in-memory MetricsSnapshot
and served as JSON by the REST API and the web UI dashboard. They are
not exposed in Prometheus exposition format.
Runtime pipeline metrics (UI / JSON)
The collector updates an internal MetricsSnapshot roughly every 10
seconds. The snapshot includes:
- Per-subscription message counters (received, aggregated, exported, dropped) and a 30-minute rolling export rate.
- Drop breakdowns by reason (
channel_full,send_timeout, backend error, processing error, validation failure) and by location (aggregator, output, backend). - Channel telemetry — capacity, current depth, usage percent for every internal channel.
- Process resources — goroutine count and total allocated memory.
You can read the snapshot two ways:
- Web UI — the Metrics dashboard renders these counters and gauges with sparklines.
- REST API — the same data is available as JSON. See the API reference for the metrics endpoints.
The runtime snapshot is not in Prometheus exposition format and
the collector does not register Prometheus collectors for any of
these counters. If you want to get them into Prometheus, scrape the
JSON endpoint with a sidecar (Prometheus json_exporter,
OpenTelemetry Collector with the httpcheck or custom JSON
receiver, etc.) and emit your own metric names.
Health vs metrics — when to use which
The two systems answer different questions:
- Health is the current evaluated state of every subscription, with severity levels and named checks. Use it to answer "is anything broken right now?" from the live UI.
- Runtime metrics (UI/JSON) are the raw counters and gauges behind the health checks — drops by reason, channel saturation, goroutines. Use them when you need the underlying numbers, not the evaluated severity.