Skip to content

Commit 0062bae

Browse files
committed
update
1 parent 7cd838a commit 0062bae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientSpanNameExtractorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ void shouldExtractFullSpanNameForSingleQueryBatch() {
166166
when(sqlAttributesGetter.getRawQueryTexts(dbRequest))
167167
.thenReturn(singleton("INSERT INTO table VALUES(?)"));
168168
when(sqlAttributesGetter.getDbNamespace(dbRequest)).thenReturn("database");
169-
when(sqlAttributesGetter.getBatchSize(dbRequest)).thenReturn(2L);
169+
if (SemconvStability.emitStableDatabaseSemconv()) {
170+
when(sqlAttributesGetter.getBatchSize(dbRequest)).thenReturn(2L);
171+
}
170172

171173
SpanNameExtractor<DbRequest> underTest = DbClientSpanNameExtractor.create(sqlAttributesGetter);
172174

@@ -177,7 +179,7 @@ void shouldExtractFullSpanNameForSingleQueryBatch() {
177179
assertEquals(
178180
SemconvStability.emitStableDatabaseSemconv()
179181
? "BATCH INSERT database.table"
180-
: "INSERT database",
182+
: "INSERT database.table",
181183
spanName);
182184
}
183185

0 commit comments

Comments
 (0)