Skip to content

Commit 9855ed4

Browse files
committed
fix
1 parent b7451ce commit 9855ed4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

instrumentation/jdbc/library/src/test/java/io/opentelemetry/instrumentation/jdbc/datasource/JdbcTelemetryTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ void buildWithDefaults() throws SQLException {
6464
span -> span.hasName("parent"),
6565
span ->
6666
span.hasName(spanName)
67-
.hasAttribute(equalTo(maybeStable(DB_STATEMENT), "SELECT ?;"))
68-
.hasAttribute(
67+
.hasAttributesSatisfying(
68+
equalTo(maybeStable(DB_STATEMENT), "SELECT ?;"),
6969
equalTo(
7070
DB_QUERY_SUMMARY,
7171
SemconvStability.emitStableDatabaseSemconv() ? spanName : null))));
@@ -234,8 +234,8 @@ void buildWithSanitizationDisabled() throws SQLException {
234234
span -> span.hasName("parent"),
235235
span ->
236236
span.hasName(spanName)
237-
.hasAttribute(equalTo(maybeStable(DB_STATEMENT), "SELECT 1;"))
238-
.hasAttribute(
237+
.hasAttributesSatisfying(
238+
equalTo(maybeStable(DB_STATEMENT), "SELECT 1;"),
239239
equalTo(
240240
DB_QUERY_SUMMARY,
241241
SemconvStability.emitStableDatabaseSemconv() ? spanName : null))));

instrumentation/jdbc/testing/src/main/java/io/opentelemetry/instrumentation/jdbc/testing/AbstractPreparedStatementParametersTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStableDbSystemName;
1111
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;
1212
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
13+
import static io.opentelemetry.semconv.DbAttributes.DB_QUERY_SUMMARY;
1314
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_CONNECTION_STRING;
1415
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_NAME;
1516
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION;
@@ -19,8 +20,6 @@
1920
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM;
2021
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_USER;
2122

22-
import static io.opentelemetry.semconv.DbAttributes.DB_QUERY_SUMMARY;
23-
2423
import com.google.common.collect.ImmutableMap;
2524
import com.google.common.collect.Maps;
2625
import io.opentelemetry.api.trace.SpanKind;

0 commit comments

Comments
 (0)