Skip to content

Commit 2f66869

Browse files
committed
error.type and db.response.status_code for jdbc
1 parent 5b75894 commit 2f66869

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

instrumentation/lettuce/lettuce-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceAsyncClientTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ void testCommandCompletesExceptionally() {
424424
.hasAttributesSatisfyingExactly(
425425
equalTo(maybeStable(DB_SYSTEM), "redis"),
426426
equalTo(maybeStable(DB_OPERATION), "DEL"),
427-
equalTo(maybeStable(ERROR_TYPE), "java.lang.IllegalStateException")
428-
)));
427+
equalTo(maybeStable(ERROR_TYPE), "java.lang.IllegalStateException"))));
429428
}
430429

431430
@Test

instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientAttributesGetter.java

+10
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,14 @@ public String getConnectionString(VertxSqlClientRequest request) {
4444
public Collection<String> getRawQueryTexts(VertxSqlClientRequest request) {
4545
return singleton(request.getQueryText());
4646
}
47+
48+
@Nullable
49+
@Override
50+
public String getResponseStatusFromException(Throwable throwable) {
51+
// 4.4.2 has this
52+
// if (throwable instanceof io.vertx.sqlclient.DatabaseException) {
53+
//
54+
// }
55+
return null;
56+
}
4757
}

0 commit comments

Comments
 (0)