Skip to content

Commit 9ee1b82

Browse files
committed
Adding a bit of documentation for the dev.
1 parent 4306525 commit 9ee1b82

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

dd-java-agent/src/main/java/io/opentracing/contrib/agent/InstrumentationChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
public class InstrumentationChecker {
1818

19-
private static final String CONFIG_FILE = "dd-trace-framework-supported.yaml";
19+
private static final String CONFIG_FILE = "dd-trace-supported-framework.yaml";
2020
private final Map<String, List<Map<String, String>>> rules;
2121
private final Map<String, String> frameworks;
2222

dd-java-agent/src/main/resources/dd-trace-framework-supported.yaml renamed to dd-java-agent/src/main/resources/dd-trace-supported-framework.yaml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### This file define all supported libraries
2+
### Syntax:
3+
### <rulename>: # the rule name defined in the otarules.btm
4+
### - check: # a list of tests, if one not matched, thus the rule is removed
5+
### articfact: <artifactId> # the artifact name to be tested
6+
### supported_version: # a regex expression to express the version required by the rule
7+
### - check: ...
8+
19
opentracing-apache-httpclient:
210
- check:
311
artifact: httpclient
@@ -37,6 +45,7 @@ opentracing-okhttp3:
3745
artifact: okhttp
3846
supported_version: 3\..*
3947

48+
# For rules opentracing-jms-2_{consumer,producer}
4049
opentracing-jms-2:
4150
- check:
4251
artifact: jms-api
@@ -50,18 +59,3 @@ opentracing-mongo-driver:
5059
artifact: mongodb-driver-async
5160
supported_version: 3\..*
5261

53-
#todo jdbc, opentracing api
54-
55-
#spring_jdbc:
56-
# artifact: jdbc
57-
# supported_version: 4\..*
58-
#hibernate-core:
59-
# artifact: jdbc
60-
# supported_version: 5\..*
61-
#opentracing-mongo-driver:
62-
# artifact: mongo-java-driver
63-
# supported_version: 3\..*
64-
#opentracing-api:
65-
# artifact: opentracing-api
66-
# supported_version: 0\.2.*
67-

dd-java-agent/src/main/resources/otarules.btm

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
### The contributions are injected using this file and byteman
2+
###
3+
### Helpers are a DD specific, they are defined in the current project
4+
### The rule names provided (RULE <rulename>) are also used in the configuration.
5+
### The name is used to remove the script if there is no support of the framework
6+
###
7+
### So, ensure that the rule name is correct defined both here and in the dd-trace-supported-framework.yaml
8+
###
9+
10+
111
# Instrument Mongo client
212
# ========================
313
RULE opentracing-mongo-driver
@@ -23,6 +33,7 @@ DO
2333
patch($this);
2434
ENDRULE
2535

36+
2637
# Instrument Apache HTTP Client
2738
# =============================
2839
RULE opentracing-apache-httpclient
@@ -35,6 +46,7 @@ DO
3546
$! = patch($!);
3647
ENDRULE
3748

49+
3850
# Instrument Elasticsearch Transport Client
3951
# ==========================================
4052
RULE opentracing-elasticsearch-client
@@ -48,6 +60,7 @@ DO
4860
$3 = patch($3);
4961
ENDRULE
5062

63+
5164
# Instrument Cassandra client
5265
# ===========================
5366
RULE opentracing-cassandra-driver
@@ -61,7 +74,6 @@ DO
6174
ENDRULE
6275

6376

64-
6577
# Instrument Jetty
6678
# ===========================
6779
# State 0 - no filter installed
@@ -90,7 +102,6 @@ DO
90102
ENDRULE
91103

92104

93-
94105
# Instrument OkHttp
95106
# ===========================
96107
RULE opentracing-okhttp3

0 commit comments

Comments
 (0)