Summary
Awa emits the queue name on spans under two different keys depending on which span you look at.
ADR-039 spans follow the OTel messaging semantic conventions and use messaging.destination.name (send {queue}, job.execute {kind}, and — since #450 — the dispatcher's receive {queue}). Everything else uses a bare queue attribute: the queue_storage.* spans (claim_runtime_batch, queue_counts, acquire_queue_claimer, …), some maintenance.* spans, and the dispatcher's own field.
The practical cost is that no single TraceQL predicate finds all spans for a queue. { span.messaging.destination.name = "email" } misses every storage span; { span.queue = "email" } misses the messaging ones. Anyone building a per-queue trace view has to write both.
Scope
Roughly 27 #[tracing::instrument] sites carry the bare form today:
| File |
Sites |
awa-worker/src/dispatcher.rs |
16 |
awa-model/src/queue_storage.rs |
9 |
awa-worker/src/maintenance.rs |
2 |
Options
- Emit both — add
messaging.destination.name alongside the existing queue on every span that has one. Nothing breaks; costs one duplicated attribute per span. Deprecate queue and drop it in a later minor.
- Rename outright — replace
queue with messaging.destination.name. Cleanest end state; silently breaks any saved TraceQL, Grafana trace panel, or Tempo metrics-generator rule keyed on span.queue.
- Leave it — document the split in
docs/grafana/README.md so people know to query both.
Option 1 is probably right if this happens at all: span names and attributes are not a compatibility surface under docs/stability.md (only metric names, types, and attribute keys are), so a rename is technically permitted — but users' saved queries are real, and the dual-emit path costs nothing but bytes.
Worth deciding alongside whether awa.* metric attributes should move the same way; the metrics surface is covered by the stability policy, so that half is a breaking change and a separate decision.
Notes
Not urgent and not a correctness issue. Surfaced while reviewing #450, which added the messaging conventions to the dispatcher's now-root poll span and made the inconsistency visible: the poll span carries both keys, so it is the one span that matches either query.
Summary
Awa emits the queue name on spans under two different keys depending on which span you look at.
ADR-039 spans follow the OTel messaging semantic conventions and use
messaging.destination.name(send {queue},job.execute {kind}, and — since #450 — the dispatcher'sreceive {queue}). Everything else uses a barequeueattribute: thequeue_storage.*spans (claim_runtime_batch,queue_counts,acquire_queue_claimer, …), somemaintenance.*spans, and the dispatcher's own field.The practical cost is that no single TraceQL predicate finds all spans for a queue.
{ span.messaging.destination.name = "email" }misses every storage span;{ span.queue = "email" }misses the messaging ones. Anyone building a per-queue trace view has to write both.Scope
Roughly 27
#[tracing::instrument]sites carry the bare form today:awa-worker/src/dispatcher.rsawa-model/src/queue_storage.rsawa-worker/src/maintenance.rsOptions
messaging.destination.namealongside the existingqueueon every span that has one. Nothing breaks; costs one duplicated attribute per span. Deprecatequeueand drop it in a later minor.queuewithmessaging.destination.name. Cleanest end state; silently breaks any saved TraceQL, Grafana trace panel, or Tempo metrics-generator rule keyed onspan.queue.docs/grafana/README.mdso people know to query both.Option 1 is probably right if this happens at all: span names and attributes are not a compatibility surface under
docs/stability.md(only metric names, types, and attribute keys are), so a rename is technically permitted — but users' saved queries are real, and the dual-emit path costs nothing but bytes.Worth deciding alongside whether
awa.*metric attributes should move the same way; the metrics surface is covered by the stability policy, so that half is a breaking change and a separate decision.Notes
Not urgent and not a correctness issue. Surfaced while reviewing #450, which added the messaging conventions to the dispatcher's now-root poll span and made the inconsistency visible: the poll span carries both keys, so it is the one span that matches either query.