Disabling ES because the contribution throws a NPE. Waiting for the 0.0.3 release of the ES contrib (it's fixed)
MODIFY
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/ElasticsearchIntegrationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/ElasticsearchIntegrationTest.java
@@ -3,7 +3,6 @@ package com.datadoghq.trace.agent.integration;
import static org.assertj.core.api.Assertions.assertThat;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import com.datadoghq.trace.DDTracer;
import java.io.IOException;
import java.net.Inet4Address;
import java.util.Collection;
@@ -22,13 +21,15 @@ import org.elasticsearch.transport.client.PreBuiltTransportClient;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
+@Ignore
public class ElasticsearchIntegrationTest extends AAgentIntegration {
private static final int HTTP_PORT = 9205;
private static final String HTTP_TRANSPORT_PORT = "9300";
- private static final String ES_WORKING_DIR = "target/es";
+ private static final String ES_WORKING_DIR = "build/es";
private static String clusterName = "elasticsearch";
private static Node node;
@@ -42,7 +43,7 @@ public class ElasticsearchIntegrationTest extends AAgentIntegration {
public static void warmup() throws NodeValidationException {
//GlobalTracer.register(tracer);
-
+ System.setProperty("es.set.netty.runtime.available.processors", "false");
Settings settings = Settings.builder()
.put("path.home", ES_WORKING_DIR)
.put("path.data", ES_WORKING_DIR + "/data")
@@ -83,10 +84,9 @@ public class ElasticsearchIntegrationTest extends AAgentIntegration {
.field("message", "trying out Elasticsearch")
.endObject()
)
+ .setTimeout("5s")
.get();
- System.out.println(response.toString());
-
assertThat(writer.getList().size()).isEqualTo(1);
}

MODIFY
dd-java-agent/src/main/resources/dd-trace-supported-framework.yaml
dd-java-agent/src/main/resources/dd-trace-supported-framework.yaml
@@ -59,11 +59,12 @@ opentracing-mongo-driver:
artifact: mongodb-driver-async
supported_version: 3\..*
-org.elasticsearch.client:
- - check:
- artifact: transport
- supported_version: 5\.4\..*
-
+# TODO, remove me, Issue NPE with the OT contrib v0.0.2, so disabling at this time
+#org.elasticsearch.client:
+# - check:
+# artifact: transport
+# supported_version: none
+## supported_version: 5\.4\..*

MODIFY
dd-java-agent/src/main/resources/otarules.btm
dd-java-agent/src/main/resources/otarules.btm
@@ -47,18 +47,18 @@ DO
ENDRULE
-# Instrument Elasticsearch Transport Client
-# ==========================================
-RULE opentracing-elasticsearch-client
-INTERFACE org.elasticsearch.client.ElasticsearchClient
-METHOD execute(org.elasticsearch.action.Action,org.elasticsearch.action.ActionRequest,org.elasticsearch.action.ActionListener)
-HELPER com.datadoghq.trace.agent.integration.ElasticsearchHelper
-AT ENTRY
-IF $# == 3 AND NOT $3.getClass().getCanonicalName().equals("io.opentracing.contrib.elasticsearch.TracingResponseListener")
-DO
- registerArgs($1);
- $3 = patch($3);
-ENDRULE
+## Instrument Elasticsearch Transport Client
+## ==========================================
+#RULE opentracing-elasticsearch-client
+#INTERFACE org.elasticsearch.client.ElasticsearchClient
+#METHOD execute(org.elasticsearch.action.Action,org.elasticsearch.action.ActionRequest,org.elasticsearch.action.ActionListener)
+#HELPER com.datadoghq.trace.agent.integration.ElasticsearchHelper
+#AT ENTRY
+#IF $# == 3 AND NOT $3.getClass().getCanonicalName().equals("io.opentracing.contrib.elasticsearch.TracingResponseListener")
+#DO
+# registerArgs($1);
+# $3 = patch($3);
+#ENDRULE
# Instrument Cassandra client

Disabling ES because the contribution throws a NPE. Waiting for the 0.0.3 release of the ES contrib (it's fixed)