Skip to content

Commit 31b82d6

Browse files
authored
Update queue consume handler span name (#1215)
This will remove job ID from the trace name, helping it decrease cardinality and allowing proper grouping of traces by job name
1 parent 57f60d4 commit 31b82d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Queue/src/Interceptor/Consume/Handler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ public function handle(
4949
];
5050

5151
return $tracer->trace(
52-
name: \sprintf('Job handling [%s:%s]', $name, $id),
52+
name: \sprintf('Job handling [%s]', $name),
5353
callback: $this->isLegacy
5454
? fn(): mixed => $this->core->callAction($name, 'handle', $arguments)
5555
: fn(): mixed => $this->core->handle(new CallContext(Target::fromPair($name, 'handle'), $arguments)),
5656
attributes: [
5757
'queue.driver' => $driver,
5858
'queue.name' => $queue,
59-
'queue.id' => $id,
59+
'queue.job.name' => $name,
60+
'queue.job.id' => $id,
6061
'queue.headers' => $headers,
6162
],
6263
scoped: true,

0 commit comments

Comments
 (0)