You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RabbitMQ consumer endpoint cache is keyed by routing key and thrashes on high-cardinality keys #643
For each received message the RabbitMQ consumer looks up tracing state in a cache keyed by exchange and routing key, capped at 256 entries. A queue bound with a wildcard that receives routing keys containing identifiers (for example order.<id>) misses on almost every message. Each miss takes a lock, concatenates strings, allocates tracing objects and evicts an entry. It also puts the full routing key into the span destination name, which makes span names high-cardinality.
Key the per-consumer tracing state by queue (computed once) and add the routing key as a span attribute only when the span is recorded.
Found by reading the code at 02fe06f; not reproduced at runtime unless stated.
Acceptance criteria
Remove routing-key-dependent tracing composition/eviction from the successful receive path; use bounded or per-consumer state rather than retaining arbitrary routing keys.
Preserve convention-defined process/settle names and attributes and assess sampler inputs at span creation; the current site promises actual destination/routing metadata to samplers, so update that documented contract explicitly if changed.
Broker-backed tests exercise many distinct routing keys, process/settle telemetry and tracing disabled; extend RabbitMqReceiveBenchmarks with high-cardinality keys and MemoryDiagnoser against equivalent native work.
Update RabbitMQ telemetry documentation. No throughput/latency/CPU/allocation trade-off is preapproved.
Audited origin/main at 3dea7d4: RabbitMqEndpointCache still caches (exchange, routing key) with cold composition and eviction. Added high-cardinality benchmark/test criteria and called out the existing sampler-input contract in website/docs/transports/rabbitmq.md; changing it must be explicit rather than silently losing metadata.
Activity
thomhurst commentedon Nov 13, 2026
Audited origin/main at 3dea7d4: RabbitMqEndpointCache still caches (exchange, routing key) with cold composition and eviction. Added high-cardinality benchmark/test criteria and called out the existing sampler-input contract in website/docs/transports/rabbitmq.md; changing it must be explicit rather than silently losing metadata.
fix(rabbitmq): scope receive tracing to consumer queues (#643)
fix(rabbitmq): scope receive tracing to consumer queues (#643)
docs: align RabbitMQ conformance tracing contract (refs #643)
fix(rabbitmq): scope receive tracing to consumer queues (#707)