Skip to content
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

Use host:port for server logging and add extra fields to EventCollector logs #1428

Open
wants to merge 2 commits into
base: v1.20
Choose a base branch
from

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Sep 19, 2024

Corrects some changes introduced in #1423

The server's connection ID is unique within the context of a single server and is only reported by MongoDB 4.2+. It should not be used to uniquely identify a server.

This reverts recent changes from 50d1db7.
This renames connectionId to server, to avoid ambiguity with serverConnectionId.

Additional fields have also been added to the output. Since PHPC 1.19, database name is available on all APM events.
Comment on lines -130 to -132
if ($event instanceof CommandStartedEvent) {
$log['databaseName'] = $event->getDatabaseName();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's now added unconditionally a few lines up.

This original logic predated PHPC 1.19 adding the property to all APM events in PHPC-2255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants