Skip to content

Commit 6ba1333

Browse files
authored
Merge branch 'master' into mhlidd/migrate_to_v2_format
2 parents f0dba27 + f2a8d05 commit 6ba1333

File tree

642 files changed

+14795
-17644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

642 files changed

+14795
-17644
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject_pattern: ^repo:DataDog/dd-trace-java:ref:refs/heads/.+$
4+
5+
claim_pattern:
6+
event_name: (push|workflow_dispatch)
7+
ref: refs/heads/.+
8+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/pin-system-tests\.yaml@refs/heads/.+
9+
10+
permissions:
11+
contents: write
12+
pull_requests: write

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ test_smoke:
728728
GRADLE_PARAMS: "-PskipFlakyTests"
729729
CACHE_TYPE: "smoke"
730730
parallel:
731-
matrix: *test_matrix_4
731+
matrix: *test_matrix_6
732732

733733
test_ssi_smoke:
734734
extends: .test_job
@@ -739,7 +739,7 @@ test_ssi_smoke:
739739
DD_INJECT_FORCE: "true"
740740
DD_INJECTION_ENABLED: "tracer"
741741
parallel:
742-
matrix: *test_matrix_4
742+
matrix: *test_matrix_6
743743

744744
test_smoke_graalvm:
745745
extends: .test_job

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/311d4ed6e0cd674e45520ecc38dfccff5c59bc987122305b2ae39600ce5e8a25/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/04f6a88e3db67cb88821632d138a2a5c3105ba59760bd3dfc60b54733501ecc3/one-pipeline.yml

buildSrc/src/main/kotlin/datadog/gradle/plugin/muzzle/MuzzlePlugin.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ class MuzzlePlugin : Plugin<Project> {
106106
// removing leading ':' if present
107107
val muzzleTaskName = taskName.removePrefix(":")
108108
val projectPath = project.path.removePrefix(":")
109-
muzzleTaskName == "muzzle" || "$projectPath:muzzle" == muzzleTaskName
109+
muzzleTaskName == "muzzle" || "$projectPath:muzzle" == muzzleTaskName ||
110+
muzzleTaskName == "runMuzzle"
110111
}
111112
if (!hasRelevantTask) {
112113
// Adding muzzle dependencies has a large config overhead. Stop unless muzzle is explicitly run.

buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ tasks.register("allTests") {
7474
// This is used when we want to run tests against the latest dependency versions.
7575
tasks.register("allLatestDepTests") {
7676
dependsOn(tasks.withType<Test>().matching { testTask ->
77-
!testTask.name.contains("latest", ignoreCase = true)
77+
testTask.name.contains("latest", ignoreCase = true)
7878
})
7979
}
8080

communication/gradle.lockfile

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,40 @@ com.github.jnr:jnr-posix:3.1.19=runtimeClasspath,testRuntimeClasspath
2828
com.github.jnr:jnr-unixsocket:0.36=compileClasspath,testCompileClasspath
2929
com.github.jnr:jnr-unixsocket:0.38.22=runtimeClasspath,testRuntimeClasspath
3030
com.github.jnr:jnr-x86asm:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
31-
com.github.spotbugs:spotbugs-annotations:4.2.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
32-
com.github.spotbugs:spotbugs-annotations:4.7.3=spotbugs
33-
com.github.spotbugs:spotbugs:4.7.3=spotbugs
31+
com.github.spotbugs:spotbugs-annotations:4.9.8=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
32+
com.github.spotbugs:spotbugs:4.9.8=spotbugs
33+
com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs
3434
com.google.code.findbugs:jsr305:3.0.2=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
35-
com.google.code.gson:gson:2.9.1=spotbugs
35+
com.google.code.gson:gson:2.13.2=spotbugs
36+
com.google.errorprone:error_prone_annotations:2.41.0=spotbugs
3637
com.squareup.moshi:moshi:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
3738
com.squareup.okhttp3:mockwebserver:3.12.12=testCompileClasspath,testRuntimeClasspath
3839
com.squareup.okhttp3:okhttp:3.12.12=testCompileClasspath,testRuntimeClasspath
3940
com.squareup.okio:okio:1.17.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4041
com.thoughtworks.qdox:qdox:1.12.1=codenarc,testRuntimeClasspath
41-
commons-codec:commons-codec:1.15=spotbugs
4242
commons-fileupload:commons-fileupload:1.5=testCompileClasspath,testRuntimeClasspath
4343
commons-io:commons-io:2.11.0=testCompileClasspath,testRuntimeClasspath
44-
de.thetaphi:forbiddenapis:3.8=compileClasspath
44+
commons-io:commons-io:2.20.0=spotbugs
45+
de.thetaphi:forbiddenapis:3.10=compileClasspath
4546
info.picocli:picocli:4.6.3=testRuntimeClasspath
4647
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
47-
jaxen:jaxen:1.2.0=spotbugs
48+
jaxen:jaxen:2.0.0=spotbugs
4849
jline:jline:2.14.6=testRuntimeClasspath
4950
junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath
5051
net.bytebuddy:byte-buddy-agent:1.18.1=testCompileClasspath,testRuntimeClasspath
5152
net.bytebuddy:byte-buddy:1.18.1=testCompileClasspath,testRuntimeClasspath
52-
net.jcip:jcip-annotations:1.0=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
53-
net.sf.saxon:Saxon-HE:11.4=spotbugs
53+
net.sf.saxon:Saxon-HE:12.9=spotbugs
5454
org.apache.ant:ant-antlr:1.10.14=codenarc
5555
org.apache.ant:ant-antlr:1.10.15=testRuntimeClasspath
5656
org.apache.ant:ant-junit:1.10.14=codenarc
5757
org.apache.ant:ant-junit:1.10.15=testRuntimeClasspath
5858
org.apache.ant:ant-launcher:1.10.15=testRuntimeClasspath
5959
org.apache.ant:ant:1.10.15=testCompileClasspath,testRuntimeClasspath
60-
org.apache.bcel:bcel:6.5.0=spotbugs
61-
org.apache.commons:commons-lang3:3.12.0=spotbugs
62-
org.apache.commons:commons-text:1.10.0=spotbugs
63-
org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs
64-
org.apache.httpcomponents.core5:httpcore5-h2:5.1.3=spotbugs
65-
org.apache.httpcomponents.core5:httpcore5:5.1.3=spotbugs
66-
org.apache.logging.log4j:log4j-api:2.19.0=spotbugs
67-
org.apache.logging.log4j:log4j-core:2.19.0=spotbugs
60+
org.apache.bcel:bcel:6.11.0=spotbugs
61+
org.apache.commons:commons-lang3:3.19.0=spotbugs
62+
org.apache.commons:commons-text:1.14.0=spotbugs
63+
org.apache.logging.log4j:log4j-api:2.25.2=spotbugs
64+
org.apache.logging.log4j:log4j-core:2.25.2=spotbugs
6865
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
6966
org.codehaus.groovy:groovy-all:3.0.24=testCompileClasspath,testRuntimeClasspath
7067
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
@@ -96,8 +93,8 @@ org.codehaus.groovy:groovy-xml:3.0.23=codenarc
9693
org.codehaus.groovy:groovy-xml:3.0.24=testCompileClasspath,testRuntimeClasspath
9794
org.codehaus.groovy:groovy:3.0.23=codenarc
9895
org.codehaus.groovy:groovy:3.0.24=testCompileClasspath,testRuntimeClasspath
99-
org.codenarc:CodeNarc:3.6.0=codenarc
100-
org.dom4j:dom4j:2.1.3=spotbugs
96+
org.codenarc:CodeNarc:3.7.0=codenarc
97+
org.dom4j:dom4j:2.2.0=spotbugs
10198
org.gmetrics:GMetrics:2.1.0=codenarc
10299
org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath
103100
org.hamcrest:hamcrest:3.0=testCompileClasspath,testRuntimeClasspath
@@ -113,42 +110,38 @@ org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntim
113110
org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath
114111
org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath
115112
org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath
116-
org.junit:junit-bom:5.9.1=spotbugs
113+
org.junit:junit-bom:5.14.0=spotbugs
117114
org.mockito:mockito-core:4.4.0=testRuntimeClasspath
118115
org.msgpack:jackson-dataformat-msgpack:0.8.20=testCompileClasspath,testRuntimeClasspath
119116
org.msgpack:msgpack-core:0.8.20=testCompileClasspath,testRuntimeClasspath
120117
org.objenesis:objenesis:3.3=testCompileClasspath,testRuntimeClasspath
121118
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
122119
org.ow2.asm:asm-analysis:7.1=compileClasspath,testCompileClasspath
123120
org.ow2.asm:asm-analysis:9.2=runtimeClasspath,testRuntimeClasspath
124-
org.ow2.asm:asm-analysis:9.4=spotbugs
121+
org.ow2.asm:asm-analysis:9.9=spotbugs
125122
org.ow2.asm:asm-commons:7.1=compileClasspath,testCompileClasspath
126123
org.ow2.asm:asm-commons:9.2=runtimeClasspath,testRuntimeClasspath
127-
org.ow2.asm:asm-commons:9.4=spotbugs
128-
org.ow2.asm:asm-commons:9.9=jacocoAnt
124+
org.ow2.asm:asm-commons:9.9=jacocoAnt,spotbugs
129125
org.ow2.asm:asm-tree:7.1=compileClasspath,testCompileClasspath
130126
org.ow2.asm:asm-tree:9.2=runtimeClasspath,testRuntimeClasspath
131-
org.ow2.asm:asm-tree:9.4=spotbugs
132-
org.ow2.asm:asm-tree:9.9=jacocoAnt
127+
org.ow2.asm:asm-tree:9.9=jacocoAnt,spotbugs
133128
org.ow2.asm:asm-util:7.1=compileClasspath,testCompileClasspath
134129
org.ow2.asm:asm-util:9.2=runtimeClasspath,testRuntimeClasspath
135-
org.ow2.asm:asm-util:9.4=spotbugs
130+
org.ow2.asm:asm-util:9.9=spotbugs
136131
org.ow2.asm:asm:7.1=compileClasspath,testCompileClasspath
137132
org.ow2.asm:asm:9.2=runtimeClasspath,testRuntimeClasspath
138-
org.ow2.asm:asm:9.4=spotbugs
139-
org.ow2.asm:asm:9.9=jacocoAnt
133+
org.ow2.asm:asm:9.9=jacocoAnt,spotbugs
140134
org.slf4j:jcl-over-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath
141135
org.slf4j:jul-to-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath
142136
org.slf4j:log4j-over-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath
143137
org.slf4j:slf4j-api:1.7.30=compileClasspath,runtimeClasspath
144138
org.slf4j:slf4j-api:1.7.32=testCompileClasspath,testRuntimeClasspath
145-
org.slf4j:slf4j-api:2.0.0=spotbugs,spotbugsSlf4j
146-
org.slf4j:slf4j-simple:2.0.0=spotbugsSlf4j
139+
org.slf4j:slf4j-api:2.0.17=spotbugs,spotbugsSlf4j
140+
org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j
147141
org.snakeyaml:snakeyaml-engine:2.9=runtimeClasspath,testRuntimeClasspath
148142
org.spockframework:spock-bom:2.4-M6-groovy-3.0=testCompileClasspath,testRuntimeClasspath
149143
org.spockframework:spock-core:2.4-M6-groovy-3.0=testCompileClasspath,testRuntimeClasspath
150144
org.testng:testng:7.5.1=testRuntimeClasspath
151145
org.webjars:jquery:3.5.1=testRuntimeClasspath
152-
org.xmlresolver:xmlresolver:4.4.3=spotbugs
153-
xml-apis:xml-apis:1.4.01=spotbugs
146+
org.xmlresolver:xmlresolver:5.3.3=spotbugs
154147
empty=annotationProcessor,spotbugsPlugins,testAnnotationProcessor

communication/src/main/java/datadog/communication/ddagent/DDAgentFeaturesDiscovery.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ private static class State {
8686
String metricsEndpoint;
8787
String dataStreamsEndpoint;
8888
boolean supportsLongRunning;
89-
boolean supportsDropping;
9089
boolean supportsClientSideStats;
90+
boolean supportsDropping;
9191
String state;
9292
String configEndpoint;
9393
String debuggerLogEndpoint;
@@ -166,7 +166,7 @@ private void doDiscovery(State newState) {
166166
errorQueryingEndpoint("info", error);
167167
}
168168
if (fallback) {
169-
newState.supportsDropping = false;
169+
newState.supportsClientSideStats = false;
170170
newState.supportsLongRunning = false;
171171
log.debug("Falling back to probing, client dropping will be disabled");
172172
// disable metrics unless the info endpoint is present, which prevents
@@ -307,13 +307,15 @@ private boolean processInfoResponse(State newState, String response) {
307307
Boolean.TRUE.equals(map.getOrDefault("long_running_spans", false));
308308

309309
if (metricsEnabled) {
310-
newState.supportsClientSideStats = !AgentVersion.isVersionBelow(newState.version, 7, 65, 0);
311310
Object canDrop = map.get("client_drop_p0s");
312311
newState.supportsDropping =
313312
null != canDrop
314313
&& ("true".equalsIgnoreCase(String.valueOf(canDrop))
315314
|| Boolean.TRUE.equals(canDrop));
316315

316+
newState.supportsClientSideStats =
317+
newState.supportsDropping && !AgentVersion.isVersionBelow(newState.version, 7, 65, 0);
318+
317319
Object peer_tags = map.get("peer_tags");
318320
newState.peerTags =
319321
peer_tags instanceof List
@@ -360,7 +362,6 @@ private static void discoverStatsDPort(final Map<String, Object> info) {
360362
public boolean supportsMetrics() {
361363
return metricsEnabled
362364
&& null != discoveryState.metricsEndpoint
363-
&& discoveryState.supportsDropping
364365
&& discoveryState.supportsClientSideStats;
365366
}
366367

@@ -380,10 +381,6 @@ public boolean supportsDebuggerDiagnostics() {
380381
return discoveryState.debuggerDiagnosticsEndpoint != null;
381382
}
382383

383-
public boolean supportsDropping() {
384-
return discoveryState.supportsDropping;
385-
}
386-
387384
public boolean supportsLongRunning() {
388385
return discoveryState.supportsLongRunning;
389386
}

communication/src/test/groovy/datadog/communication/ddagent/DDAgentFeaturesDiscoveryTest.groovy

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
6060
features.getMetricsEndpoint() == V6_METRICS_ENDPOINT
6161
!features.supportsMetrics()
6262
features.getTraceEndpoint() == "v0.5/traces"
63-
!features.supportsDropping()
6463
features.getDataStreamsEndpoint() == V01_DATASTREAMS_ENDPOINT
6564
features.supportsDataStreams()
6665
features.state() == INFO_STATE
@@ -118,7 +117,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
118117
features.getMetricsEndpoint() == V6_METRICS_ENDPOINT
119118
!features.supportsMetrics()
120119
features.getTraceEndpoint() == "v0.5/traces"
121-
!features.supportsDropping()
122120
features.getDataStreamsEndpoint() == V01_DATASTREAMS_ENDPOINT
123121
features.supportsDataStreams()
124122
features.state() == INFO_STATE
@@ -145,7 +143,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
145143
features.getMetricsEndpoint() == V6_METRICS_ENDPOINT
146144
features.supportsMetrics()
147145
features.getTraceEndpoint() == "v0.5/traces"
148-
features.supportsDropping()
149146
features.state() == INFO_WITH_CLIENT_DROPPING_STATE
150147
0 * _
151148
}
@@ -201,7 +198,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
201198
features.getMetricsEndpoint() == null
202199
!features.supportsMetrics()
203200
features.getTraceEndpoint() == "v0.5/traces"
204-
!features.supportsDropping()
205201
!features.supportsLongRunning()
206202
features.state() == PROBE_STATE
207203
0 * _
@@ -222,7 +218,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
222218
features.getMetricsEndpoint() == null
223219
!features.supportsMetrics()
224220
features.getTraceEndpoint() == "v0.5/traces"
225-
!features.supportsDropping()
226221
!features.supportsLongRunning()
227222
features.state() == PROBE_STATE
228223
0 * _
@@ -245,7 +240,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
245240
features.getMetricsEndpoint() == null
246241
!features.supportsMetrics()
247242
features.getTraceEndpoint() == "v0.4/traces"
248-
!features.supportsDropping()
249243
features.state() == PROBE_STATE
250244
0 * _
251245
}
@@ -267,7 +261,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
267261
features.getMetricsEndpoint() == null
268262
!features.supportsMetrics()
269263
features.getTraceEndpoint() == "v0.4/traces"
270-
!features.supportsDropping()
271264
features.state() == PROBE_STATE
272265
0 * _
273266
}
@@ -290,7 +283,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
290283
!features.supportsMetrics()
291284
features.getTraceEndpoint() == "v0.3/traces"
292285
!features.supportsLongRunning()
293-
!features.supportsDropping()
294286
features.state() == PROBE_STATE
295287
0 * _
296288
}
@@ -308,7 +300,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
308300
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.5/traces" }) >> { Request request -> success(request) }
309301
0 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.6/stats" })
310302
!features.supportsMetrics()
311-
!features.supportsDropping()
312303
!(features as DroppingPolicy).active()
313304
features.state() == PROBE_STATE
314305

@@ -318,7 +309,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
318309
then: "metrics and dropping not supported"
319310
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, INFO_WITH_CLIENT_DROPPING_RESPONSE) }
320311
!features.supportsMetrics()
321-
!features.supportsDropping()
322312
!(features as DroppingPolicy).active()
323313
features.state() == INFO_WITH_CLIENT_DROPPING_STATE
324314

@@ -328,7 +318,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
328318
then: "metrics and dropping not supported"
329319
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, INFO_RESPONSE) }
330320
!features.supportsMetrics()
331-
!features.supportsDropping()
332321
!(features as DroppingPolicy).active()
333322
features.state() == INFO_STATE
334323
0 * _
@@ -346,7 +335,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
346335
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> notFound(request) }
347336
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.4/traces" }) >> { Request request -> success(request) }
348337
0 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.6/stats" })
349-
!features.supportsDropping()
350338
!features.supportsMetrics()
351339
!(features as DroppingPolicy).active()
352340
features.state() == PROBE_STATE
@@ -357,7 +345,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
357345
then: "metrics endpoint not probed, metrics and dropping enabled"
358346
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, INFO_WITH_CLIENT_DROPPING_RESPONSE) }
359347
0 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.4/traces" }) >> { Request request -> success(request) }
360-
features.supportsDropping()
361348
features.supportsMetrics()
362349
(features as DroppingPolicy).active()
363350
features.state() == INFO_WITH_CLIENT_DROPPING_STATE
@@ -376,7 +363,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
376363
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, INFO_WITH_CLIENT_DROPPING_RESPONSE) }
377364
0 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.4/traces" }) >> { Request request -> success(request) }
378365
0 * client.newCall(_)
379-
features.supportsDropping()
380366
features.supportsMetrics()
381367
(features as DroppingPolicy).active()
382368
features.state() == INFO_WITH_CLIENT_DROPPING_STATE
@@ -388,7 +374,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
388374
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> notFound(request) }
389375
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.4/traces" }) >> { Request request -> success(request) }
390376
0 * client.newCall(_)
391-
!features.supportsDropping()
392377
!features.supportsMetrics()
393378
!(features as DroppingPolicy).active()
394379
features.state() == PROBE_STATE
@@ -407,7 +392,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
407392
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, INFO_WITH_CLIENT_DROPPING_RESPONSE) }
408393
0 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.4/traces" }) >> { Request request -> success(request) }
409394
0 * client.newCall(_)
410-
features.supportsDropping()
411395
features.supportsMetrics()
412396
(features as DroppingPolicy).active()
413397
features.state() == INFO_WITH_CLIENT_DROPPING_STATE
@@ -418,8 +402,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
418402
then: "metrics and dropping not supported"
419403
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, INFO_WITHOUT_METRICS_RESPONSE) }
420404
0 * client.newCall(_)
421-
// misconfigured agent allows dropping but not metrics
422-
features.supportsDropping()
423405
!features.supportsMetrics()
424406
// but we don't permit dropping anyway
425407
!(features as DroppingPolicy).active()
@@ -481,7 +463,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
481463
then:
482464
1 * client.newCall(_) >> { Request request -> infoResponse(request, INFO_WITH_PEER_TAG_BACK_PROPAGATION_RESPONSE) }
483465
features.state() == INFO_WITH_PEER_TAG_BACK_PROPAGATION_STATE
484-
features.supportsDropping()
485466
features.peerTags().containsAll(
486467
"_dd.base_service",
487468
"active_record.db.vendor",
@@ -519,7 +500,6 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
519500
infoResponse(request, response)
520501
}
521502
features.getMetricsEndpoint() == V6_METRICS_ENDPOINT
522-
features.supportsDropping() == true
523503
features.supportsMetrics() == expected
524504

525505
where:

0 commit comments

Comments
 (0)