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

Add server detection based on host names during MongoClient construct… #1214

Merged
merged 5 commits into from
Oct 7, 2023

Conversation

vbabanin
Copy link
Member

@vbabanin vbabanin commented Oct 4, 2023

This PR introduces cluster type detection during MongoClient construction, triggering informative logs for CosmosDB, and DocumentDB (so far). Messages guide users to external support resources.

@vbabanin vbabanin requested review from a team and rozza and removed request for a team October 4, 2023 04:09
@@ -52,6 +58,7 @@
*/
@SuppressWarnings("deprecation")
public final class DefaultClusterFactory {
private static final Logger LOGGER = Loggers.getLogger("DefaultClusterFactory");
Copy link
Member Author

Choose a reason for hiding this comment

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

There is a specification for structured logging messages that ensures consistent logging within drivers. However, since those log messages do not adhere to any specification, the regular approach to logging is being used.

Copy link
Member

Choose a reason for hiding this comment

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

Ack

Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

Looks really good. I only have a couple of optional nits.

LGTM

@@ -52,6 +58,7 @@
*/
@SuppressWarnings("deprecation")
public final class DefaultClusterFactory {
private static final Logger LOGGER = Loggers.getLogger("DefaultClusterFactory");
Copy link
Member

Choose a reason for hiding this comment

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

Ack

- Inline method.

JAVA-5089
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

LGTM

@vbabanin vbabanin merged commit fc6a68a into mongodb:master Oct 7, 2023
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