Skip to content

Commit 0a2897b

Browse files
committed
rename MongoCommentInjector's getComment to buildComment
1 parent 4f6ca55 commit 0a2897b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dd-java-agent/instrumentation/mongo/common/src/main/java/datadog/trace/instrumentation/mongo/MongoCommentInjector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static BsonDocument injectComment(String dbmComment, BsonDocument origina
5555
}
5656

5757
/** Build comment content using SharedDBCommenter */
58-
public static String getComment(AgentSpan dbSpan, String hostname, String dbName) {
58+
public static String buildComment(AgentSpan dbSpan, String hostname, String dbName) {
5959
if (!INJECT_COMMENT) {
6060
return null;
6161
}

dd-java-agent/instrumentation/mongo/common/src/test/groovy/MongoCommentInjectorTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ class MongoCommentInjectorTest extends BaseMongoCommentInjectorTest {
9393
}
9494
9595
class MongoCommentInjectorDisabledModeForkedTest extends BaseMongoCommentInjectorTest {
96-
def "getComment returns null when INJECT_COMMENT is false"() {
96+
def 'buildComment returns null when INJECT_COMMENT is false'() {
9797
setup:
9898
injectSysConfig(TraceInstrumentationConfig.DB_DBM_PROPAGATION_MODE_MODE, "disabled")
9999
100100
when:
101-
String comment = MongoCommentInjector.getComment(null, null, null)
101+
String comment = MongoCommentInjector.buildComment(null, null, null)
102102
103103
then:
104104
comment == null

dd-java-agent/instrumentation/mongo/driver-3.1/src/main/java/datadog/trace/instrumentation/mongo/DefaultServerConnection31Instrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static void onEnter(
7878
hostname = connectionDescription.getServerAddress().getHost();
7979
}
8080

81-
String dbmComment = MongoCommentInjector.getComment(span, hostname, dbName);
81+
String dbmComment = MongoCommentInjector.buildComment(span, hostname, dbName);
8282
if (dbmComment != null) {
8383
originalBsonDocument = MongoCommentInjector.injectComment(dbmComment, originalBsonDocument);
8484
}

dd-java-agent/instrumentation/mongo/driver-4.0/src/main/java/datadog/trace/instrumentation/mongo/DefaultServerConnection40Instrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static void onEnter(
8080
hostname = connectionDescription.getServerAddress().getHost();
8181
}
8282

83-
String dbmComment = MongoCommentInjector.getComment(span, hostname, dbName);
83+
String dbmComment = MongoCommentInjector.buildComment(span, hostname, dbName);
8484
if (dbmComment != null) {
8585
originalBsonDocument = MongoCommentInjector.injectComment(dbmComment, originalBsonDocument);
8686
}

0 commit comments

Comments
 (0)