Remove ES-transport instrumentation from rest test
It is generating an extra trace/span that in a realistic scenario would be generated by the server, not the client.
This commit is contained in:
parent
1535a9ae38
commit
4199f924ac
|
@ -31,14 +31,10 @@ dependencies {
|
||||||
implementation deps.autoservice
|
implementation deps.autoservice
|
||||||
|
|
||||||
testCompile project(':dd-java-agent:testing')
|
testCompile project(':dd-java-agent:testing')
|
||||||
// Ensure no cross interference
|
|
||||||
testCompile project(':dd-java-agent:instrumentation:elasticsearch-transport-5')
|
|
||||||
testCompile project(':dd-java-agent:instrumentation:elasticsearch-transport-6')
|
|
||||||
// Include httpclient instrumentation for testing because it is a dependency for elasticsearch-rest-client.
|
// Include httpclient instrumentation for testing because it is a dependency for elasticsearch-rest-client.
|
||||||
// It doesn't actually work though. They use HttpAsyncClient, which isn't currently instrumented.
|
// It doesn't actually work though. They use HttpAsyncClient, which isn't currently instrumented.
|
||||||
// TODO: add HttpAsyncClient instrumentation when that is complete.
|
// TODO: add Apache's HttpAsyncClient instrumentation when that is complete.
|
||||||
testCompile project(':dd-java-agent:instrumentation:apache-httpclient-4')
|
testCompile project(':dd-java-agent:instrumentation:apache-httpclient-4')
|
||||||
// TODO: add netty instrumentation when that is complete.
|
|
||||||
|
|
||||||
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
|
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
|
||||||
testCompile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
|
testCompile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
|
||||||
|
|
|
@ -78,25 +78,8 @@ class Elasticsearch6RestClientTest extends AgentTestRunner {
|
||||||
expect:
|
expect:
|
||||||
result.status == "green"
|
result.status == "green"
|
||||||
|
|
||||||
assertTraces(2) {
|
assertTraces(1) {
|
||||||
trace(0, 1) {
|
trace(0, 1) {
|
||||||
span(0) {
|
|
||||||
serviceName "elasticsearch"
|
|
||||||
resourceName "ClusterHealthAction"
|
|
||||||
operationName "elasticsearch.query"
|
|
||||||
spanType DDSpanTypes.ELASTICSEARCH
|
|
||||||
parent()
|
|
||||||
tags {
|
|
||||||
"$Tags.COMPONENT.key" "elasticsearch-java"
|
|
||||||
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_CLIENT
|
|
||||||
"$DDTags.SPAN_TYPE" DDSpanTypes.ELASTICSEARCH
|
|
||||||
"elasticsearch.action" "ClusterHealthAction"
|
|
||||||
"elasticsearch.request" "ClusterHealthRequest"
|
|
||||||
defaultTags()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
trace(1, 1) {
|
|
||||||
span(0) {
|
span(0) {
|
||||||
serviceName "elasticsearch"
|
serviceName "elasticsearch"
|
||||||
resourceName "GET _cluster/health"
|
resourceName "GET _cluster/health"
|
||||||
|
|
Loading…
Reference in New Issue