-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue integration fixes #904
Conversation
@@ -68,6 +68,7 @@ public function onBoot(Dispatcher $events): void | |||
->setOp(self::QUEUE_SPAN_OP_QUEUE_PUBLISH) | |||
->setData([ | |||
'messaging.system' => 'laravel', | |||
'messaging.message.id' => $payload['uuid'] ?? null, | |||
'messaging.destination.name' => $queue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is prepended with "queue:" to something like: queues:queue-name
We need to "fix" this because otherwise the published are on the wrong destination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out... only the Redis driver does this. We could argue Laravel should fix this but let's also fix it ourselfs 😄
'messaging.message.id' => (string) $event->job->getJobId(), | ||
|
||
'messaging.message.id' => $jobPayload['uuid'] ?? $event->job->getJobId(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep the string cast for $event->job->getJobId()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's documented as returning a string? When doesn't it do that?
Maybe we should just rely on $jobPayload['uuid']
anyway otherwise they will never match. Laravel should always add a ID to the job payload. Not sure if it's possible to not have one.
$job->getJobId()
is publisher (like SQS) ID)queues:
prefix for queue names when using Redis driver