diff --git a/instrumentation/mongodb/src/test/java/brave/mongodb/MongoDBContainer.java b/instrumentation/mongodb/src/test/java/brave/mongodb/MongoDBContainer.java index d5c4556f3..237f20643 100644 --- a/instrumentation/mongodb/src/test/java/brave/mongodb/MongoDBContainer.java +++ b/instrumentation/mongodb/src/test/java/brave/mongodb/MongoDBContainer.java @@ -66,8 +66,9 @@ MongoClientSettings.Builder mongoClientSettingsBuilder() { new ServerAddress(host(), port())))); } + /** Return an IP address to ensure remote IP checks work. */ String host() { - return getHost(); + return "127.0.0.1"; } int port() {