Update dropwizard and spring boot readmes.
MODIFY
dd-java-agent/dd-java-agent.gradle
dd-java-agent/dd-java-agent.gradle
@@ -97,7 +97,10 @@ shadowJar {
if (!project.hasProperty("disableShadowRelocate") || !disableShadowRelocate) {
// Don't relocate slf4j or opentracing deps.
- relocate 'com.fasterxml', 'dd.deps.com.fasterxml'
+ relocate('com.fasterxml', 'dd.deps.com.fasterxml') {
+ exclude 'com.fasterxml.jackson.core.type.TypeReference'
+ exclude 'com.fasterxml.jackson.annotation.*'
+ }
relocate 'javassist', 'dd.deps.javassist'
relocate 'org.reflections', 'dd.deps.org.reflections'
relocate 'org.yaml', 'dd.deps.org.yaml'

MODIFY
dd-java-agent/src/main/java/com/datadoghq/trace/agent/InstrumentationChecker.java
dd-java-agent/src/main/java/com/datadoghq/trace/agent/InstrumentationChecker.java
package com.datadoghq.trace.agent;
import com.datadoghq.trace.resolver.FactoryUtils;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.File;
@@ -193,7 +192,6 @@ public class InstrumentationChecker {
}
@Data
- @JsonIgnoreProperties("check")
static class ArtifactSupport {
private String artifact;

MODIFY
dd-java-agent/src/main/resources/dd-trace-supported-framework.yaml
dd-java-agent/src/main/resources/dd-trace-supported-framework.yaml
@@ -55,8 +55,7 @@ opentracing-mongo-driver:
- com.mongodb.operation.AsyncReadOperation
- com.mongodb.client.model.MapReduceAction
- - check:
- artifact: mongodb-driver-async
+ - artifact: mongodb-driver-async
supported_version: 3\..*
identifying_present_classes:
- com.mongodb.operation.AsyncReadOperation
@@ -69,8 +68,7 @@ opentracing-mongo-driver-helper:
- com.mongodb.operation.AsyncReadOperation
- com.mongodb.client.model.MapReduceAction
- - check:
- artifact: mongodb-driver-async
+ - artifact: mongodb-driver-async
supported_version: 3\..*
identifying_present_classes:
- com.mongodb.operation.AsyncReadOperation

MODIFY
dd-trace-examples/dropwizard-mongo-client/README.md
dd-trace-examples/dropwizard-mongo-client/README.md
@@ -12,7 +12,7 @@ auto-instrumentation for all endpoints. Manual instrumentation has been added as
Be sure to build the project so that the latest version of ``dd-trace-java`` components are used. You can build
all libraries and examples launching from the ``dd-trace-java`` root folder:
```bash
-./gradlew clean shadowJar
+./gradlew clean shadowJar installDist
```
Then you can start all services via Docker:
@@ -30,6 +30,11 @@ Launch the application using the run wrapper you've built during the ``installDi
JAVA_OPTS=-javaagent:../../dd-java-agent/build/libs/dd-java-agent-{version}.jar build/install/dropwizard-mongo-client/bin/dropwizard-mongo-client server
```
+Or as an executable jar:
+```bash
+java -javaagent:../../dd-java-agent/build/libs/dd-java-agent-{version}.jar -jar build/libs/dropwizard-mongo-client-demo-all.jar server
+```
+
``0.2.0-SNAPSHOT`` is an example of what ``{version}`` looks like.
### Generate traces

MODIFY
dd-trace-examples/dropwizard-mongo-client/dropwizard-mongo-client.gradle
dd-trace-examples/dropwizard-mongo-client/dropwizard-mongo-client.gradle
+plugins {
+ id "com.github.johnrengelman.shadow" version "2.0.1"
+}
+
apply plugin: 'application'
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
@@ -21,6 +25,17 @@ dependencies {
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.7.0'
}
+jar {
+ manifest {
+ attributes 'Main-Class': 'com.datadoghq.example.dropwizard.BookApplication'
+ }
+}
+
+shadowJar {
+ mergeServiceFiles()
+}
+
+
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}

MODIFY
dd-trace-examples/spring-boot-jdbc/README.md
dd-trace-examples/spring-boot-jdbc/README.md
@@ -12,7 +12,7 @@ to trace the endpoints.
Be sure to build the project so that the latest version of ``dd-trace-java`` components are used. You can build
all libraries and examples launching from the ``dd-trace-java`` root folder:
```bash
-./gradlew clean shadowJar
+./gradlew clean shadowJar bootRepackage
```
Then you can launch the Datadog agent as follows:
@@ -30,9 +30,14 @@ To launch the application, just:
./gradlew bootRun
```
-The ``bootRun`` Gradle command appends automatically the ``-javaagent`` argument, so that you don't need to specify
+*Note: The ``bootRun`` Gradle command appends automatically the ``-javaagent`` argument, so that you don't need to specify
the path of the Java Agent. Gradle executes the ``:dd-trace-examples:spring-boot-jdbc:bootRun`` task until you
-stop it.
+stop it.*
+
+Or as an executable jar:
+```bash
+java -javaagent:../../dd-java-agent/build/libs/dd-java-agent-{version}.jar -jar build/libs/spring-boot-jdbc-demo.jar
+```
### Generate traces

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/resolver/FactoryUtils.java
dd-trace/src/main/java/com/datadoghq/trace/resolver/FactoryUtils.java
@@ -30,7 +30,7 @@ public class FactoryUtils {
}
public static <A> A loadConfigFromFilePropertyOrResource(
- final String systemProperty, final String resourceName, final TypeReference type) {
+ final String systemProperty, final String resourceName, final TypeReference<A> type) {
final String filePath = System.getProperty(systemProperty);
if (filePath != null) {
try {
@@ -74,7 +74,8 @@ public class FactoryUtils {
return config;
}
- public static <A> A loadConfigFromResource(final String resourceName, final TypeReference type) {
+ public static <A> A loadConfigFromResource(
+ final String resourceName, final TypeReference<A> type) {
A config = null;
// Try loading both suffixes

Update dropwizard and spring boot readmes.