Exclude NATS status frames from consumed metrics#1195
Conversation
consumed.messages and received.bytes count only messages delivered to the application, per the OTel messaging convention. NATS status/control frames (no-responder 503s, JetStream heartbeats, flow-control, protocol notifications) are consumed internally and never reach the application, but the base receive path counted them. Skip them via the inline status code on the version line, which covers every subscription type through one chokepoint.
|
Claude finished @mtmk's task in 3m 20s —— View job PR Review
SummaryThe implementation is correct and well-structured. A few observations:
Ordering: Tests — The unit tests in One minor note: No correctness bugs, security issues, or performance concerns found. |
consumed.messages and received.bytes now count only messages delivered to the application, per the OpenTelemetry messaging convention. NATS status and control frames (no-responder 503s, JetStream heartbeats, flow-control, and protocol notifications) are consumed internally and were previously inflating both counters on the receive path.
Fixes #1168.