Skip to content

Commit 0579cc7

Browse files
committed
reduce diff
1 parent aef9a61 commit 0579cc7

File tree

5 files changed

+3
-14
lines changed

5 files changed

+3
-14
lines changed

instrumentation/jdbc/javaagent/src/test/scala/io/opentelemetry/javaagent/instrumentation/scalaexecutors/SlickTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
package io.opentelemetry.javaagent.instrumentation.jdbc.slick
6+
package io.opentelemetry.javaagent.instrumentation.scalaexecutors
77

88
import io.opentelemetry.api.trace.{SpanKind, Tracer}
99
import io.opentelemetry.instrumentation.api.internal.SemconvStability.emitStableDatabaseSemconv

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,12 @@ protected InstrumentationExtension testing() {
3232

3333
@Override
3434
protected Connection wrap(Connection connection) throws SQLException {
35-
// if (connection instanceof OpenTelemetryConnection) {
36-
// return connection;
37-
// }
3835
DataSource dataSource = telemetry.wrap(new SingleConnectionDataSource(connection));
3936
return dataSource.getConnection();
4037
}
4138

4239
@Override
4340
protected DataSource wrap(DataSource dataSource) {
44-
// if (dataSource instanceof OpenTelemetryDataSource) {
45-
// return dataSource;
46-
// }
4741
return telemetry.wrap(dataSource);
4842
}
4943
}

instrumentation/jdbc/library/src/test/java/io/opentelemetry/instrumentation/jdbc/PreparedStatementParametersTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ protected InstrumentationExtension testing() {
3434

3535
@Override
3636
protected Connection wrap(Connection connection) throws SQLException {
37-
// if (connection instanceof OpenTelemetryConnection) {
38-
// return connection;
39-
// }
4037
DataSource dataSource = telemetry.wrap(new SingleConnectionDataSource(connection));
4138
return dataSource.getConnection();
4239
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public static <T> T proxy(
5959
// in the same package as the package private interface
6060
// by default we ignore jdk proxies, having the proxy in a different package ensures it gets
6161
// instrumented
62-
String expectedPackage = TestInterface.class.getPackage().getName();
63-
if (!proxy.getClass().getName().startsWith(expectedPackage)) {
62+
if (!proxy.getClass().getName().startsWith("io.opentelemetry.instrumentation.jdbc.testing")) {
6463
throw new IllegalStateException("proxy is in wrong package");
6564
}
6665

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ protected synchronized Class<?> loadClass(String name, boolean resolve)
2323
if (clazz != null) {
2424
return clazz;
2525
}
26-
String instrumentationPackage = TestInterface.class.getPackage().getName();
27-
if (name.startsWith(instrumentationPackage)) {
26+
if (name.startsWith("io.opentelemetry.instrumentation.jdbc.testing")) {
2827
try {
2928
return findClass(name);
3029
} catch (ClassNotFoundException exception) {

0 commit comments

Comments
 (0)