Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -236,7 +236,8 @@ public final class ConfigDefaults {
static final boolean DEFAULT_TELEMETRY_LOG_COLLECTION_ENABLED = true;
static final int DEFAULT_TELEMETRY_DEPENDENCY_RESOLUTION_QUEUE_SIZE = 100000;

static final Set<String> DEFAULT_TRACE_EXPERIMENTAL_FEATURES_ENABLED = new HashSet<>();
static final Set<String> DEFAULT_TRACE_EXPERIMENTAL_FEATURES_ENABLED =
new HashSet<>(asList("DD_TAGS", "DD_LOGS_INJECTION"));
Comment thread
amarziali marked this conversation as resolved.

static final boolean DEFAULT_TRACE_128_BIT_TRACEID_GENERATION_ENABLED = true;
static final boolean DEFAULT_TRACE_128_BIT_TRACEID_LOGGING_ENABLED = true;
Expand Down
5 changes: 3 additions & 2 deletions internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,9 @@ private Config(final ConfigProvider configProvider, final InstrumenterConfig ins
SERVLET_ROOT_CONTEXT_SERVICE_NAME, DEFAULT_SERVLET_ROOT_CONTEXT_SERVICE_NAME);

experimentalFeaturesEnabled =
configProvider.getSet(
TRACE_EXPERIMENTAL_FEATURES_ENABLED, DEFAULT_TRACE_EXPERIMENTAL_FEATURES_ENABLED);
configProvider.getString(TRACE_EXPERIMENTAL_FEATURES_ENABLED, "").equals("all")
? DEFAULT_TRACE_EXPERIMENTAL_FEATURES_ENABLED
: configProvider.getSet(TRACE_EXPERIMENTAL_FEATURES_ENABLED, new HashSet<>());

integrationSynapseLegacyOperationName =
configProvider.getBoolean(INTEGRATION_SYNAPSE_LEGACY_OPERATION_NAME, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ class ConfigTest extends DDSpecification {
System.setProperty(PREFIX + PROPAGATION_STYLE_INJECT, " ")
System.setProperty(PREFIX + TRACE_LONG_RUNNING_ENABLED, "invalid")
System.setProperty(PREFIX + TRACE_LONG_RUNNING_FLUSH_INTERVAL, "invalid")
System.setProperty(PREFIX + TRACE_EXPERIMENTAL_FEATURES_ENABLED, " ")

when:
def config = new Config()
Expand Down Expand Up @@ -666,6 +667,7 @@ class ConfigTest extends DDSpecification {
config.tracePropagationStylesToExtract.toList() == [DATADOG, TRACECONTEXT, BAGGAGE]
config.tracePropagationStylesToInject.toList() == [DATADOG, TRACECONTEXT, BAGGAGE]
config.longRunningTraceEnabled == false
config.experimentalFeaturesEnabled == [].toSet()
}

def "sys props and env vars overrides for trace_agent_port and agent_port_legacy as expected"() {
Expand Down Expand Up @@ -1928,6 +1930,17 @@ class ConfigTest extends DDSpecification {
config.globalTags == [env:"test", aKey:"aVal", bKey:"bVal"]
}

def "verify behavior of DD_TRACE_EXPERIMENTAL_FEATURE_ENABLED when value is 'all'"() {
setup:
environmentVariables.set("DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED", "all")

when:
def config = new Config()

then:
config.experimentalFeaturesEnabled == ["DD_TAGS", "DD_LOGS_INJECTION"].toSet()
}

def "detect if agent is configured using default values"() {
setup:
if (host != null) {
Expand Down