Summary
In gateway metrics events, queue-depth measure routing is checked before the issue_id dimension, so a request combining them silently goes to the queue-depth endpoint and the dimension is ignored.
Reproduce
hookdeck gateway metrics events --start ... --end ... \
--measures queue_depth --dimensions issue_id --issue-id iss_xxx
Routes to /metrics/queue-depth. The issue_id dimension is dropped; no error.
Root cause
queryEventMetricsConsolidated in pkg/cmd/metrics_events.go evaluates route conditions in order: queue-depth measures first, then pending, then the issue_id dimension / --issue-id filter. The first match wins, so a queue-depth measure shadows a by-issue request.
Why it matters
Same family as #382 — the user asks for one thing and gets an unflagged answer to a different question. Lower impact than #382 because the combination is unusual, but the failure mode is identical: a plausible-looking number that does not answer what was asked.
Suggested fix
Treat it as a cross-route conflict, consistent with the mixed-measure rejection added in #392: refuse the combination and name both routes, rather than silently picking one. The helper introduced there (RejectMixedMeasureRoutes) already establishes the pattern and the message style.
Testing
Unit, alongside the existing routing tests in pkg/cmd/metrics_events_routing_test.go, which drive the router against an httptest server and assert the path actually requested.
Related
Filed by Claude on Phil's behalf, from release-candidate testing.
Summary
In
gateway metrics events, queue-depth measure routing is checked before theissue_iddimension, so a request combining them silently goes to the queue-depth endpoint and the dimension is ignored.Reproduce
Routes to
/metrics/queue-depth. Theissue_iddimension is dropped; no error.Root cause
queryEventMetricsConsolidatedinpkg/cmd/metrics_events.goevaluates route conditions in order: queue-depth measures first, then pending, then theissue_iddimension /--issue-idfilter. The first match wins, so a queue-depth measure shadows a by-issue request.Why it matters
Same family as #382 — the user asks for one thing and gets an unflagged answer to a different question. Lower impact than #382 because the combination is unusual, but the failure mode is identical: a plausible-looking number that does not answer what was asked.
Suggested fix
Treat it as a cross-route conflict, consistent with the mixed-measure rejection added in #392: refuse the combination and name both routes, rather than silently picking one. The helper introduced there (
RejectMixedMeasureRoutes) already establishes the pattern and the message style.Testing
Unit, alongside the existing routing tests in
pkg/cmd/metrics_events_routing_test.go, which drive the router against anhttptestserver and assert the path actually requested.Related
Filed by Claude on Phil's behalf, from release-candidate testing.