-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Add worker metadata inside logs #43355
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
Conversation
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.
Nice!
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.
👍
@@ -31,7 +31,7 @@ public function onWorkerStarted(WorkerStartedEvent $event): void | |||
{ | |||
pcntl_signal(\SIGTERM, function () use ($event) { | |||
if (null !== $this->logger) { | |||
$this->logger->info('Received SIGTERM signal.'); | |||
$this->logger->info('Received SIGTERM signal.', ['transportNames' => $event->getWorker()->getMetadata()->getTransportNames()]); |
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.
I think we are using underscore names in such a situation, so transport_names
.
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.
@fabpot in fact, I've found both cases camelCase
|snake_case
in the codebase
I'll rework this but maybe it is needed a consensus here :)
6d6eca4
to
649cb10
Compare
Thank you @94noni. |
Small PR related to one of my comment #42723 (comment) on the ticket PR: having this contextual info is valuable imho
cc @ruudk @okwinza @fabpot