Skip to content

Commit

Permalink
Enable telemetry logs for services using AppSec (#7534)
Browse files Browse the repository at this point in the history
  • Loading branch information
smola authored Aug 30, 2024
1 parent 44c20d2 commit 7438ef7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ public void reinitialize() {
// DDLoggerFactory can be called at very early stage, before Config is loaded
// So to get property/env we use this custom function
private static boolean isLogCollectionEnabled() {
// FIXME: For the initial rollout, we default log collection to true for IAST and CI Visibility
// FIXME: For the initial rollout, we default log collection to true for IAST, Dynamic
// Instrumentation, and CI Visibility
// FIXME: For progressive rollout, we include by default Java < 11 hosts as product independent
// FIXME: sample users.
// FIXME: This should be removed once we default to true.
final boolean defaultValue =
isFlagEnabled("dd.iast.enabled", "DD_IAST_ENABLED", false)
|| isFlagEnabled("dd.appsec.enabled", "DD_APPSEC_ENABLED", false)
|| isFlagEnabled("dd.civisibility.enabled", "DD_CIVISIBILITY_ENABLED", false)
|| isFlagEnabled(
"dd.dynamic.instrumentation.enabled", "DD_DYNAMIC_INSTRUMENTATION_ENABLED", false)
Expand Down
3 changes: 2 additions & 1 deletion internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,8 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
// together with the rest of telemetry config.
final boolean telemetryLogCollectionEnabledDefault =
instrumenterConfig.isTelemetryEnabled()
&& (instrumenterConfig.getIastActivation() == ProductActivation.FULLY_ENABLED
&& (instrumenterConfig.getAppSecActivation() == ProductActivation.FULLY_ENABLED
|| instrumenterConfig.getIastActivation() == ProductActivation.FULLY_ENABLED
|| instrumenterConfig.isCiVisibilityEnabled()
|| debuggerEnabled
|| !Platform.isJavaVersionAtLeast(11))
Expand Down

0 comments on commit 7438ef7

Please sign in to comment.