Skip to content

Commit a4df16d

Browse files
committed
Enable telemetry logs for services using AppSec
1 parent 6025023 commit a4df16d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dd-java-agent/agent-logging/src/main/java/datadog/trace/logging/ddlogger/DDLoggerFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ public void reinitialize() {
9191
// DDLoggerFactory can be called at very early stage, before Config is loaded
9292
// So to get property/env we use this custom function
9393
private static boolean isLogCollectionEnabled() {
94-
// FIXME: For the initial rollout, we default log collection to true for IAST and CI Visibility
94+
// FIXME: For the initial rollout, we default log collection to true for IAST, Dynamic
95+
// Instrumentation, and CI Visibility
9596
// FIXME: For progressive rollout, we include by default Java < 11 hosts as product independent
9697
// FIXME: sample users.
9798
// FIXME: This should be removed once we default to true.
9899
final boolean defaultValue =
99100
isFlagEnabled("dd.iast.enabled", "DD_IAST_ENABLED", false)
101+
|| isFlagEnabled("dd.appsec.enabled", "DD_APPSEC_ENABLED", false)
100102
|| isFlagEnabled("dd.civisibility.enabled", "DD_CIVISIBILITY_ENABLED", false)
101103
|| isFlagEnabled(
102104
"dd.dynamic.instrumentation.enabled", "DD_DYNAMIC_INSTRUMENTATION_ENABLED", false)

internal-api/src/main/java/datadog/trace/api/Config.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,7 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
20132013
final boolean telemetryLogCollectionEnabledDefault =
20142014
instrumenterConfig.isTelemetryEnabled()
20152015
&& (instrumenterConfig.getIastActivation() == ProductActivation.FULLY_ENABLED
2016+
&& (instrumenterConfig.getAppSecActivation() == ProductActivation.FULLY_ENABLED
20162017
|| instrumenterConfig.isCiVisibilityEnabled()
20172018
|| debuggerEnabled
20182019
|| !Platform.isJavaVersionAtLeast(11))

0 commit comments

Comments
 (0)