The backpressure counter never records, so a throttled feed looks idle on the dashboard #66

Open
opened 2026-11-03 18:52:33 +00:00 by skippy-bot · 0 comments

Problem

The producer emits a backpressure event whose measurements map carries buffer_size only, while the Prometheus counter and the dashboard counter both read a :count measurement. The series is never created, so an operator watching for ingestion slowdown sees a flat or missing backpressure panel while overflow drops climb, and cannot tell a brief spike from an hour of throttling.

Evidence

At 2f150f66:

  • lib/aprsme/packet_producer.ex:162 executes [:aprsme, :packet_producer, :backpressure] with %{buffer_size: size}, and :187 does the same on deactivate.
  • lib/aprsme/prom_ex/plugins/aprsme.ex:101 registers a counter with measurement: :count for that event.
  • lib/aprsme_web/telemetry.ex:117 registers the same metric for the dashboard.

Expected

Each activation and deactivation increments a counter, for example by emitting %{count: 1, buffer_size: size}.

How to verify

Attach a telemetry handler to the event and assert the measurements map has :count, or watch for {:measurement_not_found, :count} from the Prometheus core when the event fires.

Acceptance criteria

  • The event carries the measurement its consumers read.
  • A test asserts the counter increments on activation and deactivation.

Effort: S
Lens: ops

## Problem The producer emits a backpressure event whose measurements map carries `buffer_size` only, while the Prometheus counter and the dashboard counter both read a `:count` measurement. The series is never created, so an operator watching for ingestion slowdown sees a flat or missing backpressure panel while overflow drops climb, and cannot tell a brief spike from an hour of throttling. ## Evidence At `2f150f66`: - `lib/aprsme/packet_producer.ex:162` executes `[:aprsme, :packet_producer, :backpressure]` with `%{buffer_size: size}`, and `:187` does the same on deactivate. - `lib/aprsme/prom_ex/plugins/aprsme.ex:101` registers a counter with `measurement: :count` for that event. - `lib/aprsme_web/telemetry.ex:117` registers the same metric for the dashboard. ## Expected Each activation and deactivation increments a counter, for example by emitting `%{count: 1, buffer_size: size}`. ## How to verify Attach a telemetry handler to the event and assert the measurements map has `:count`, or watch for `{:measurement_not_found, :count}` from the Prometheus core when the event fires. ## Acceptance criteria - [ ] The event carries the measurement its consumers read. - [ ] A test asserts the counter increments on activation and deactivation. **Effort:** S **Lens:** ops
Sign in to join this conversation.
No description provided.