Adding a bit of documentation for the dev.
MODIFY
dd-java-agent/src/main/java/io/opentracing/contrib/agent/InstrumentationChecker.java
dd-java-agent/src/main/java/io/opentracing/contrib/agent/InstrumentationChecker.java
@@ -16,7 +16,7 @@ import java.util.regex.Pattern;
*/
public class InstrumentationChecker {
- private static final String CONFIG_FILE = "dd-trace-framework-supported.yaml";
+ private static final String CONFIG_FILE = "dd-trace-supported-framework.yaml";
private final Map<String, List<Map<String, String>>> rules;
private final Map<String, String> frameworks;

RENAME
dd-java-agent/src/main/resources/dd-trace-framework-supported.yaml
dd-java-agent/src/main/resources/dd-trace-supported-framework.yaml
+### This file define all supported libraries
+### Syntax:
+### <rulename>: # the rule name defined in the otarules.btm
+### - check: # a list of tests, if one not matched, thus the rule is removed
+### articfact: <artifactId> # the artifact name to be tested
+### supported_version: # a regex expression to express the version required by the rule
+### - check: ...
+
opentracing-apache-httpclient:
- check:
artifact: httpclient
@@ -37,6 +45,7 @@ opentracing-okhttp3:
artifact: okhttp
supported_version: 3\..*
+# For rules opentracing-jms-2_{consumer,producer}
opentracing-jms-2:
- check:
artifact: jms-api
@@ -50,18 +59,3 @@ opentracing-mongo-driver:
artifact: mongodb-driver-async
supported_version: 3\..*
-#todo jdbc, opentracing api
-
-#spring_jdbc:
-# artifact: jdbc
-# supported_version: 4\..*
-#hibernate-core:
-# artifact: jdbc
-# supported_version: 5\..*
-#opentracing-mongo-driver:
-# artifact: mongo-java-driver
-# supported_version: 3\..*
-#opentracing-api:
-# artifact: opentracing-api
-# supported_version: 0\.2.*
-

MODIFY
dd-java-agent/src/main/resources/otarules.btm
dd-java-agent/src/main/resources/otarules.btm
+### The contributions are injected using this file and byteman
+###
+### Helpers are a DD specific, they are defined in the current project
+### The rule names provided (RULE <rulename>) are also used in the configuration.
+### The name is used to remove the script if there is no support of the framework
+###
+### So, ensure that the rule name is correct defined both here and in the dd-trace-supported-framework.yaml
+###
+
+
# Instrument Mongo client
# ========================
RULE opentracing-mongo-driver
@@ -23,6 +33,7 @@ DO
patch($this);
ENDRULE
+
# Instrument Apache HTTP Client
# =============================
RULE opentracing-apache-httpclient
@@ -35,6 +46,7 @@ DO
$! = patch($!);
ENDRULE
+
# Instrument Elasticsearch Transport Client
# ==========================================
RULE opentracing-elasticsearch-client
@@ -48,6 +60,7 @@ DO
$3 = patch($3);
ENDRULE
+
# Instrument Cassandra client
# ===========================
RULE opentracing-cassandra-driver
@@ -61,7 +74,6 @@ DO
ENDRULE
-
# Instrument Jetty
# ===========================
# State 0 - no filter installed
@@ -90,7 +102,6 @@ DO
ENDRULE
-
# Instrument OkHttp
# ===========================
RULE opentracing-okhttp3

Adding a bit of documentation for the dev.