Skip to content

Commit a3e9c4b

Browse files
committed
dup
1 parent 975bb97 commit a3e9c4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoAttributesExtractor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package io.opentelemetry.instrumentation.mongo.v3_1;
77

8+
import static io.opentelemetry.instrumentation.api.internal.SemconvStability.emitOldDatabaseSemconv;
89
import static io.opentelemetry.instrumentation.api.internal.SemconvStability.emitStableDatabaseSemconv;
910
import static java.util.Arrays.asList;
1011

@@ -32,7 +33,8 @@ public void onStart(
3233
if (collectionName != null) {
3334
if (emitStableDatabaseSemconv()) {
3435
attributes.put(DB_COLLECTION_NAME, collectionName);
35-
} else {
36+
}
37+
if (emitOldDatabaseSemconv()) {
3638
attributes.put(DB_MONGODB_COLLECTION, collectionName);
3739
}
3840
}

0 commit comments

Comments
 (0)