Skip to content

Commit 5068473

Browse files
committed
jdbc
1 parent 98b546e commit 5068473

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

instrumentation/jdbc/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jdbc/test/JdbcInstrumentationTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import static io.opentelemetry.semconv.DbAttributes.DB_SYSTEM_NAME;
2020
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
2121
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_CONNECTION_STRING;
22+
import static io.opentelemetry.semconv.incubating.PeerIncubatingAttributes.PEER_SERVICE;
2223
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_NAME;
2324
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION;
2425
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SQL_TABLE;
@@ -1108,6 +1109,7 @@ void testGetClientInfoException(String query) throws SQLException {
11081109
equalTo(
11091110
DB_CONNECTION_STRING,
11101111
emitStableDatabaseSemconv() ? null : "testdb://localhost"),
1112+
equalTo(PEER_SERVICE, "test-peer-service"),
11111113
equalTo(SERVER_ADDRESS, "localhost"))));
11121114
}
11131115

@@ -1194,6 +1196,7 @@ void testProduceProperSpanName(
11941196
equalTo(maybeStable(DB_STATEMENT), sanitizedQuery),
11951197
equalTo(maybeStable(DB_OPERATION), operation),
11961198
equalTo(maybeStable(DB_SQL_TABLE), table),
1199+
equalTo(PEER_SERVICE, "test-peer-service"),
11971200
equalTo(SERVER_ADDRESS, "localhost"))));
11981201
}
11991202

@@ -1317,6 +1320,7 @@ void testHandleRecursiveStatements(
13171320
equalTo(maybeStable(DB_STATEMENT), "SELECT * FROM table"),
13181321
equalTo(maybeStable(DB_OPERATION), "SELECT"),
13191322
equalTo(maybeStable(DB_SQL_TABLE), "table"),
1323+
equalTo(PEER_SERVICE, "test-peer-service"),
13201324
equalTo(SERVER_ADDRESS, "localhost"))));
13211325
}
13221326

peer

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
JDBC - Database client
2+
Apache Dubbo - RPC framework

0 commit comments

Comments
 (0)