Skip to content

Add databaseName to command succeeded/failed events/logs #1213

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

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

jyemin
Copy link
Collaborator

@jyemin jyemin commented Oct 3, 2023

@jyemin jyemin requested a review from vbabanin October 3, 2023 20:04
@jyemin
Copy link
Collaborator Author

jyemin commented Oct 3, 2023

Looks like some tests in LoggingCommandEventSenderSpecification are broken. Will look.

entries.add(new Entry(DURATION_MS, elapsedTimeNanos / NANOS_PER_MILLI));
},
entries -> entries.add(new Entry(COMMAND_CONTENT, null)));
}

if (eventRequired()) {
sendCommandFailedEvent(message, commandName, description, elapsedTimeNanos, commandEventException, commandListener,
requestContext, operationContext);
sendCommandFailedEvent(message, message.getNamespace().getDatabaseName(), commandName, description, elapsedTimeNanos,
Copy link
Member

@vbabanin vbabanin Oct 5, 2023

Choose a reason for hiding this comment

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

nit/optional: message.getNamespace().getDatabaseName() is used in several places, so it can be extracted to a variable for improved readability.

Copy link
Member

@vbabanin vbabanin left a comment

Choose a reason for hiding this comment

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

LGTM!

@jyemin jyemin merged commit 33aa2ba into mongodb:master Oct 5, 2023
@jyemin jyemin deleted the j4875 branch October 5, 2023 21:31
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