File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
library/src/test/java/io/opentelemetry/instrumentation/jdbc/datasource
testing/src/main/java/io/opentelemetry/instrumentation/jdbc/testing Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff 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 ))));
Original file line number Diff line number Diff line change 1010import static io .opentelemetry .instrumentation .testing .junit .db .SemconvStabilityUtil .maybeStableDbSystemName ;
1111import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .assertThat ;
1212import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .equalTo ;
13+ import static io .opentelemetry .semconv .DbAttributes .DB_QUERY_SUMMARY ;
1314import static io .opentelemetry .semconv .incubating .DbIncubatingAttributes .DB_CONNECTION_STRING ;
1415import static io .opentelemetry .semconv .incubating .DbIncubatingAttributes .DB_NAME ;
1516import static io .opentelemetry .semconv .incubating .DbIncubatingAttributes .DB_OPERATION ;
1920import static io .opentelemetry .semconv .incubating .DbIncubatingAttributes .DB_SYSTEM ;
2021import static io .opentelemetry .semconv .incubating .DbIncubatingAttributes .DB_USER ;
2122
22- import static io .opentelemetry .semconv .DbAttributes .DB_QUERY_SUMMARY ;
23-
2423import com .google .common .collect .ImmutableMap ;
2524import com .google .common .collect .Maps ;
2625import io .opentelemetry .api .trace .SpanKind ;
You can’t perform that action at this time.
0 commit comments