Lightning.Channels.PromExPlugin (Lightning v2.19.0-pre)
View SourcePromEx plugin exposing metrics for the Channels HTTP reverse-proxy.
Telemetry is layered into two spans:
- Outer
:inboundspan — wraps every/channels/*hit, including probes with invalid UUIDs or unknown channel IDs. Tagged byoutcome(:resolved | :invalid_uuid | :unknown_channel) so we can surface edge traffic and scanning behaviour without leaking the raw URL segment into metric labels. - Inner
:requestspan — opens only after channel resolution succeeds. Tagged byproject_id(a bounded, trusted value), it tracks real proxy operations: how many start, how long they take, and what their outcome is.
Metrics emitted:
lightning_channel_proxy_inbound_total{outcome}— counter on the outer span's:stopevent. Counts every inbound request, bucketed by outcome.lightning_channel_proxy_requests_started_total{project_id}— counter on the inner span's:startevent. Started metadata already carries the resolvedproject_id, so no separate counted event is needed.lightning_channel_proxy_request_duration_milliseconds{project_id}— distribution of total time spent in the inner span. Its_countseries doubles as the finished-request total, so a separate finished counter is not emitted.
Concurrent in-flight requests cannot be derived precisely from these
counters — request lifetimes (ms) are far shorter than typical scrape
intervals (s), so any started − finished subtraction is ~always zero
at scrape boundaries.