File tree 5 files changed +30
-0
lines changed
jdbc/src/main/java/io/opentelemetry/auto/instrumentation/jdbc
rediscala-1.8/src/main/java/io/opentelemetry/auto/instrumentation/rediscala
5 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package io .opentelemetry .auto .instrumentation .jdbc ;
18
18
19
+ import static io .opentelemetry .auto .tooling .ClassLoaderMatcher .hasClassesNamed ;
19
20
import static io .opentelemetry .auto .tooling .bytebuddy .matcher .AgentElementMatchers .hasInterface ;
20
21
import static io .opentelemetry .auto .tooling .bytebuddy .matcher .AgentElementMatchers .implementsInterface ;
21
22
import static java .util .Collections .singletonMap ;
@@ -40,6 +41,11 @@ public ConnectionInstrumentation() {
40
41
super ("jdbc" );
41
42
}
42
43
44
+ @ Override
45
+ public ElementMatcher <ClassLoader > classLoaderMatcher () {
46
+ return hasClassesNamed ("java.sql.Connection" );
47
+ }
48
+
43
49
@ Override
44
50
public ElementMatcher <TypeDescription > typeMatcher () {
45
51
return implementsInterface (named ("java.sql.Connection" ));
Original file line number Diff line number Diff line change 16
16
17
17
package io .opentelemetry .auto .instrumentation .jdbc ;
18
18
19
+ import static io .opentelemetry .auto .tooling .ClassLoaderMatcher .hasClassesNamed ;
19
20
import static io .opentelemetry .auto .tooling .bytebuddy .matcher .AgentElementMatchers .implementsInterface ;
20
21
import static java .util .Collections .singletonMap ;
21
22
import static net .bytebuddy .matcher .ElementMatchers .nameStartsWith ;
@@ -42,6 +43,11 @@ public DriverInstrumentation() {
42
43
super ("jdbc" );
43
44
}
44
45
46
+ @ Override
47
+ public ElementMatcher <ClassLoader > classLoaderMatcher () {
48
+ return hasClassesNamed ("java.sql.Driver" );
49
+ }
50
+
45
51
@ Override
46
52
public ElementMatcher <TypeDescription > typeMatcher () {
47
53
return implementsInterface (named ("java.sql.Driver" ));
Original file line number Diff line number Diff line change 17
17
package io .opentelemetry .auto .instrumentation .jdbc ;
18
18
19
19
import static io .opentelemetry .auto .instrumentation .jdbc .JdbcTracer .TRACER ;
20
+ import static io .opentelemetry .auto .tooling .ClassLoaderMatcher .hasClassesNamed ;
20
21
import static io .opentelemetry .auto .tooling .bytebuddy .matcher .AgentElementMatchers .implementsInterface ;
21
22
import static java .util .Collections .singletonMap ;
22
23
import static net .bytebuddy .matcher .ElementMatchers .isPublic ;
@@ -43,6 +44,11 @@ public PreparedStatementInstrumentation() {
43
44
super ("jdbc" );
44
45
}
45
46
47
+ @ Override
48
+ public ElementMatcher <ClassLoader > classLoaderMatcher () {
49
+ return hasClassesNamed ("java.sql.PreparedStatement" );
50
+ }
51
+
46
52
@ Override
47
53
public ElementMatcher <TypeDescription > typeMatcher () {
48
54
return implementsInterface (named ("java.sql.PreparedStatement" ));
Original file line number Diff line number Diff line change 17
17
package io .opentelemetry .auto .instrumentation .jdbc ;
18
18
19
19
import static io .opentelemetry .auto .instrumentation .jdbc .JdbcTracer .TRACER ;
20
+ import static io .opentelemetry .auto .tooling .ClassLoaderMatcher .hasClassesNamed ;
20
21
import static io .opentelemetry .auto .tooling .bytebuddy .matcher .AgentElementMatchers .implementsInterface ;
21
22
import static java .util .Collections .singletonMap ;
22
23
import static net .bytebuddy .matcher .ElementMatchers .isPublic ;
@@ -43,6 +44,11 @@ public StatementInstrumentation() {
43
44
super ("jdbc" );
44
45
}
45
46
47
+ @ Override
48
+ public ElementMatcher <ClassLoader > classLoaderMatcher () {
49
+ return hasClassesNamed ("java.sql.Statement" );
50
+ }
51
+
46
52
@ Override
47
53
public ElementMatcher <TypeDescription > typeMatcher () {
48
54
return implementsInterface (named ("java.sql.Statement" ));
Original file line number Diff line number Diff line change 18
18
19
19
import static io .opentelemetry .auto .instrumentation .rediscala .RediscalaClientDecorator .DECORATE ;
20
20
import static io .opentelemetry .auto .instrumentation .rediscala .RediscalaClientDecorator .TRACER ;
21
+ import static io .opentelemetry .auto .tooling .ClassLoaderMatcher .hasClassesNamed ;
21
22
import static io .opentelemetry .auto .tooling .bytebuddy .matcher .AgentElementMatchers .safeHasSuperType ;
22
23
import static io .opentelemetry .auto .tooling .matcher .NameMatchers .namedOneOf ;
23
24
import static io .opentelemetry .trace .Span .Kind .CLIENT ;
@@ -51,6 +52,11 @@ public RediscalaInstrumentation() {
51
52
super ("rediscala" , "redis" );
52
53
}
53
54
55
+ @ Override
56
+ public ElementMatcher <ClassLoader > classLoaderMatcher () {
57
+ return hasClassesNamed ("redis.Request" );
58
+ }
59
+
54
60
@ Override
55
61
public ElementMatcher <TypeDescription > typeMatcher () {
56
62
return safeHasSuperType (
You can’t perform that action at this time.
0 commit comments