Move annotations to a dedicated Jar + change the doc to depend on it
MODIFY
.gitignore
.gitignore
@@ -37,5 +37,5 @@ Thumbs.db
/target
**/target/
-/dd-java-agent/dependency-reduced-pom.xml
-/dd-trace/dependency-reduced-pom.xml
+**/dependency-reduced-pom.xml
+/bin

MODIFY
dd-java-agent/README.md
dd-java-agent/README.md
@@ -150,7 +150,7 @@ public void myMethod() throws InterruptedException{
By default, the operation name attached to the spawn span will be the name of the method and no meta tags will be attached.
-You can use the the `operationName` and `tagsKV` attributes to customize your trace:
+You can use the `operationName` and `tagsKV` attributes to customize your trace:
```java
@Trace(operationName="Before DB",tagsKV={"mytag","myvalue"})
@@ -161,12 +161,12 @@ public void myMethod() throws InterruptedException{
### Enabling custom tracing
-- Add the agent as a dependency of your project
+- Add the annotations jar as a dependency of your project
```xml
<dependency>
<groupId>com.datadoghq</groupId>
- <artifactId>dd-java-agent</artifactId>
+ <artifactId>dd-trace-annotations</artifactId>
<version>{version}</version>
</dependency>
```

MODIFY
dd-java-agent/pom.xml
dd-java-agent/pom.xml
<artifactId>dd-trace</artifactId>
<version>${dd-trace.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.datadoghq</groupId>
+ <artifactId>dd-trace-annotations</artifactId>
+ <version>${dd-trace.version}</version>
+ </dependency>
<!-- Opentracing agent -->
<dependency>

ADD
dd-trace-annotations/pom.xml
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.datadoghq</groupId>
+ <artifactId>dd-trace-java</artifactId>
+ <version>0.0.5-SNAPSHOT</version>
+ </parent>
+ <groupId>com.datadoghq</groupId>
+ <artifactId>dd-trace-annotations</artifactId>
+ <version>0.0.5-SNAPSHOT</version>
+ <name>dd-trace-annotations</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>

RENAME
dd-trace/src/main/java/io/opentracing/contrib/agent/Trace.java
dd-trace-annotations/src/main/java/io/opentracing/contrib/agent/Trace.java
MODIFY
dd-trace-examples/dropwizard-mongo-client/pom.xml
dd-trace-examples/dropwizard-mongo-client/pom.xml
<!-- This dependency is required for the @trace annotation -->
<dependency>
<groupId>com.datadoghq</groupId>
- <artifactId>dd-trace</artifactId>
+ <artifactId>dd-trace-annotations</artifactId>
<version>${dd-trace.version}</version>
</dependency>

MODIFY
pom.xml
pom.xml
<module>dd-java-agent</module>
<module>dd-java-agent-ittests</module>
<module>dd-trace-examples</module>
+ <module>dd-trace-annotations</module>
</modules>
<properties>

Move annotations to a dedicated Jar + change the doc to depend on it