Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fb856c0
Protocol v1: draft implementation
AlexeyKuznetsov-DD Mar 10, 2026
37be0e8
Added chunk attributes.
AlexeyKuznetsov-DD Mar 10, 2026
7d72919
Added process tags.
AlexeyKuznetsov-DD Mar 11, 2026
cd59310
Fixed first span metadata processing.
AlexeyKuznetsov-DD Mar 11, 2026
deab351
Disable test temporary.
AlexeyKuznetsov-DD Mar 11, 2026
549bef5
Forced to use v1 for testing.
AlexeyKuznetsov-DD Mar 11, 2026
5e329c5
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 12, 2026
7d86270
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 12, 2026
e593140
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 13, 2026
c55bed4
Fixed mock server to support v1 and some renaming.
AlexeyKuznetsov-DD Mar 13, 2026
ca09892
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 14, 2026
2e9fd4a
Fixed v1 protocol emulation.
AlexeyKuznetsov-DD Mar 14, 2026
c12267b
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 16, 2026
c320eee
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 16, 2026
c781a95
Added missing baggage. Fixed smoke tests.
AlexeyKuznetsov-DD Mar 16, 2026
a2a31b6
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 16, 2026
0450392
Flatten attrs. Fixed tests.
AlexeyKuznetsov-DD Mar 17, 2026
c86443e
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 17, 2026
882350a
Top level.
AlexeyKuznetsov-DD Mar 17, 2026
68e07c2
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 17, 2026
a1afc49
Added `/info` point for mock server.
AlexeyKuznetsov-DD Mar 17, 2026
c41c697
Merge branch 'master' into alexeyk/protocol-v1-1
AlexeyKuznetsov-DD Mar 17, 2026
6f232d3
Refactored code duplication.
AlexeyKuznetsov-DD Mar 17, 2026
808761a
Refactored protocol version to be enum instead of string.
AlexeyKuznetsov-DD Mar 17, 2026
1a4021d
Fixed failed tests.
AlexeyKuznetsov-DD Mar 17, 2026
690427a
Fixed failed tests.
AlexeyKuznetsov-DD Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static datadog.communication.http.OkHttpUtils.msgpackRequestBodyOf;
import static datadog.communication.http.OkHttpUtils.prepareRequest;
import static datadog.communication.serialization.msgpack.MsgPackWriter.FIXARRAY;
import static datadog.trace.api.ProtocolVersion.V0_4;
import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;
import static java.util.Collections.singletonList;
Expand All @@ -17,6 +18,7 @@
import datadog.metrics.api.Recording;
import datadog.metrics.impl.statsd.DDAgentStatsDClientManager;
import datadog.trace.api.BaseHash;
import datadog.trace.api.ProtocolVersion;
import datadog.trace.api.telemetry.LogCollector;
import datadog.trace.util.Strings;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -50,6 +52,7 @@ public class DDAgentFeaturesDiscovery implements DroppingPolicy {
public static final String V03_ENDPOINT = "v0.3/traces";
public static final String V04_ENDPOINT = "v0.4/traces";
public static final String V05_ENDPOINT = "v0.5/traces";
public static final String V1_ENDPOINT = "v1.0/traces";

public static final String V06_METRICS_ENDPOINT = "v0.6/stats";
public static final String V07_CONFIG_ENDPOINT = "v0.7/config";
Expand Down Expand Up @@ -107,15 +110,12 @@ public DDAgentFeaturesDiscovery(
OkHttpClient client,
Monitoring monitoring,
HttpUrl agentUrl,
boolean enableV05Traces,
ProtocolVersion protocolVersion,
boolean metricsEnabled) {
this.client = client;
this.agentBaseUrl = agentUrl;
this.metricsEnabled = metricsEnabled;
this.traceEndpoints =
enableV05Traces
? new String[] {V05_ENDPOINT, V04_ENDPOINT, V03_ENDPOINT}
: new String[] {V04_ENDPOINT, V03_ENDPOINT};
this.traceEndpoints = (protocolVersion == null ? V0_4 : protocolVersion).traceEndpoints();
this.discoveryTimer = monitoring.newTimer("trace.agent.discovery.time");
this.discoveryState = new State();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public DDAgentFeaturesDiscovery featuresDiscovery(Config config) {
agentHttpClient,
monitoring,
agentUrl,
config.isTraceAgentV05Enabled(),
config.getProtocolVersion(),
config.isTracerMetricsEnabled());

if (paused) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import static datadog.communication.ddagent.DDAgentFeaturesDiscovery.V04_ENDPOIN
import static datadog.communication.ddagent.DDAgentFeaturesDiscovery.V05_ENDPOINT
import static datadog.communication.ddagent.DDAgentFeaturesDiscovery.V06_METRICS_ENDPOINT
import static datadog.communication.ddagent.DDAgentFeaturesDiscovery.V07_CONFIG_ENDPOINT
import static datadog.communication.ddagent.DDAgentFeaturesDiscovery.V1_ENDPOINT
import static datadog.communication.http.OkHttpUtils.DATADOG_CONTAINER_ID
import static datadog.communication.http.OkHttpUtils.DATADOG_CONTAINER_TAGS_HASH
import static datadog.trace.api.ProtocolVersion.V0_4
import static datadog.trace.api.ProtocolVersion.V0_5
import static datadog.trace.api.ProtocolVersion.V1_0

import datadog.common.container.ContainerInfo
import datadog.metrics.api.Monitoring
Expand Down Expand Up @@ -51,7 +55,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, v05Enabled, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, protocol, true)

when: "/info available"
features.discover()
Expand All @@ -77,15 +81,33 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
0 * _

where:
v05Enabled | expectedTraceEndpoint
false | V04_ENDPOINT
true | V05_ENDPOINT
protocol | expectedTraceEndpoint
V0_4 | V04_ENDPOINT
V0_5 | V05_ENDPOINT
V1_0 | V1_ENDPOINT
}

def "null protocol version falls back to v0.4 trace endpoints"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features =
new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, null, true)

when:
features.discover()

then:
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/info" }) >> { Request request -> infoResponse(request, "{}") }
0 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.5/traces" }) >> { Request request -> success(request) }
1 * client.newCall({ Request request -> request.url().toString() == "http://localhost:8125/v0.4/traces" }) >> { Request request -> success(request) }
features.getTraceEndpoint() == V04_ENDPOINT
0 * _
}

def "Should change discovery state atomically after discovery happened"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand All @@ -111,7 +133,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with discoverIfOutdated"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discoverIfOutdated()
Expand Down Expand Up @@ -139,7 +161,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with client dropping"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand All @@ -157,7 +179,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with data streams unavailable"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand All @@ -176,7 +198,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with long running spans available"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand All @@ -190,7 +212,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test fallback when /info empty"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, false, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_4, true)

when: "/info is empty"
features.discover()
Expand All @@ -212,7 +234,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test fallback when /info not found"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info unavailable"
features.discover()
Expand All @@ -234,7 +256,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test fallback when /info not found and agent returns ok"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info unavailable"
features.discover()
Expand All @@ -254,7 +276,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test fallback when /info not found and v0.5 disabled"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, false, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_4, true)

when: "/info unavailable"
features.discover()
Expand All @@ -275,7 +297,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test fallback when /info not found and v0.5 unavailable agent side"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info unavailable"
features.discover()
Expand All @@ -296,7 +318,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test fallback on very old agent"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info unavailable"
features.discover()
Expand All @@ -318,7 +340,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "disabling metrics disables metrics and dropping"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, false)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, false)

when: "/info unavailable"
features.discover()
Expand Down Expand Up @@ -354,7 +376,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "discovery of metrics endpoint after agent upgrade enables dropping and metrics"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, false, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_4, true)

when: "/info unavailable"
features.discover()
Expand Down Expand Up @@ -382,7 +404,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "disappearance of info endpoint after agent downgrade disables metrics and dropping"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, false, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_4, true)

when: "/info available"
features.discover()
Expand Down Expand Up @@ -411,7 +433,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "disappearance of metrics endpoint after agent downgrade disables metrics and dropping"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, false, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_4, true)

when: "/info available"
features.discover()
Expand Down Expand Up @@ -441,7 +463,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with telemetry proxy"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand All @@ -458,7 +480,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with old EVP proxy"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand All @@ -477,7 +499,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test parse /info response with peer tag back propagation"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "/info available"
features.discover()
Expand Down Expand Up @@ -510,7 +532,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test metrics disabled for agent version below 7.65"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "agent version is below 7.65"
features.discover()
Expand Down Expand Up @@ -544,7 +566,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "test metrics disabled for agent with unparseable version"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)

when: "agent version is unparseable"
features.discover()
Expand All @@ -570,7 +592,7 @@ class DDAgentFeaturesDiscoveryTest extends DDSpecification {
def "should send container id as header on the info request and parse the hash in the response"() {
setup:
OkHttpClient client = Mock(OkHttpClient)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, true, true)
DDAgentFeaturesDiscovery features = new DDAgentFeaturesDiscovery(client, monitoring, agentUrl, V0_5, true)
def oldContainerId = ContainerInfo.get().getContainerId()
def oldContainerTagsHash = ContainerInfo.get().getContainerTagsHash()
ContainerInfo.get().setContainerId("test")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package datadog.communication.ddagent

import static datadog.trace.api.ProtocolVersion.V0_4
import static datadog.trace.api.config.TracerConfig.AGENT_HOST

import datadog.metrics.api.Monitoring
import datadog.trace.api.Config
import datadog.trace.test.util.DDSpecification
import okhttp3.HttpUrl
import okhttp3.OkHttpClient

import static datadog.trace.api.config.TracerConfig.AGENT_HOST

class SharedCommunicationsObjectsSpecification extends DDSpecification {
SharedCommunicationObjects sco = new SharedCommunicationObjects()

Expand All @@ -31,7 +32,7 @@ class SharedCommunicationsObjectsSpecification extends DDSpecification {
sco.featuresDiscovery(config)

then:
1 * config.traceAgentV05Enabled >> false
1 * config.protocolVersion >> V0_4
1 * config.tracerMetricsEnabled >> false
sco.featuresDiscovery != null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"/v0.4/services",
"/v0.5/traces",
"/v0.6/stats",
"/v1.0/traces",
"/profiling/v1/input",
"/v0.1/pipeline_stats",
"/evp_proxy/v1/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package datadog.appsec.benchmark;

import static datadog.trace.api.ProtocolVersion.V0_4;
import static datadog.trace.api.gateway.Events.EVENTS;
import static java.util.concurrent.TimeUnit.MICROSECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand Down Expand Up @@ -187,7 +188,7 @@ public Call clone() {

static class StubDDAgentFeaturesDiscovery extends DDAgentFeaturesDiscovery {
public StubDDAgentFeaturesDiscovery(OkHttpClient client) {
super(client, Monitoring.DISABLED, HttpUrl.get("http://localhost:8080/"), false, false);
super(client, Monitoring.DISABLED, HttpUrl.get("http://localhost:8080/"), V0_4, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import com.datadog.debugger.sink.DebuggerSink
import com.datadog.debugger.sink.ProbeStatusSink
import com.google.common.collect.Sets
import datadog.communication.ddagent.DDAgentFeaturesDiscovery
import datadog.instrument.classinject.ClassInjector
import datadog.metrics.agent.AgentMeter
import datadog.metrics.api.Monitoring
import datadog.metrics.api.statsd.StatsDClient
import datadog.metrics.impl.DDSketchHistograms
import datadog.metrics.impl.MonitoringImpl
import datadog.metrics.api.statsd.StatsDClient
import datadog.instrument.classinject.ClassInjector
import datadog.trace.agent.test.asserts.ListWriterAssert
import datadog.trace.agent.test.datastreams.MockFeaturesDiscovery
import datadog.trace.agent.test.datastreams.RecordingDatastreamsPayloadWriter
Expand Down Expand Up @@ -387,8 +387,10 @@ abstract class InstrumentationSpecification extends DDSpecification implements A
// emit traces to the APM Test-Agent for Cross-Tracer Testing Trace Checks
HttpUrl agentUrl = HttpUrl.get("http://" + agentHost + ":" + DEFAULT_TRACE_AGENT_PORT)
OkHttpClient client = buildHttpClient(true, null, null, TimeUnit.SECONDS.toMillis(DEFAULT_AGENT_TIMEOUT))
DDAgentFeaturesDiscovery featureDiscovery = new DDAgentFeaturesDiscovery(client, Monitoring.DISABLED, agentUrl, Config.get().isTraceAgentV05Enabled(), Config.get().isTracerMetricsEnabled())
TEST_AGENT_API = new DDAgentApi(client, agentUrl, featureDiscovery, Monitoring.DISABLED, Config.get().isTracerMetricsEnabled())

Config cfg = Config.get()
DDAgentFeaturesDiscovery featureDiscovery = new DDAgentFeaturesDiscovery(client, Monitoring.DISABLED, agentUrl, cfg.getProtocolVersion(), cfg.isTracerMetricsEnabled())
TEST_AGENT_API = new DDAgentApi(client, agentUrl, featureDiscovery, Monitoring.DISABLED, cfg.isTracerMetricsEnabled())
TEST_AGENT_WRITER = DDAgentWriter.builder().agentApi(TEST_AGENT_API).build()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import datadog.communication.ddagent.DDAgentFeaturesDiscovery;
import datadog.metrics.api.Monitoring;
import datadog.trace.api.ProtocolVersion;

// TODO Ideally, DDAgentFeaturesDiscovery would be an interface to create a proper testable stubs
public class MockFeaturesDiscovery extends DDAgentFeaturesDiscovery {
private final boolean supportsDataStreams;

public MockFeaturesDiscovery(boolean supportsDataStreams) {
super(null, Monitoring.DISABLED, null, true, true);
super(null, Monitoring.DISABLED, null, ProtocolVersion.V0_5, true);
this.supportsDataStreams = supportsDataStreams;
}

Expand Down
Loading
Loading