diff --git a/dd-java-agent/agent-logging/src/main/java/datadog/trace/logging/ddlogger/DDLoggerFactory.java b/dd-java-agent/agent-logging/src/main/java/datadog/trace/logging/ddlogger/DDLoggerFactory.java index 6cc9aff09b1..47d03e7cf9e 100644 --- a/dd-java-agent/agent-logging/src/main/java/datadog/trace/logging/ddlogger/DDLoggerFactory.java +++ b/dd-java-agent/agent-logging/src/main/java/datadog/trace/logging/ddlogger/DDLoggerFactory.java @@ -91,20 +91,10 @@ 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, 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) - || !Platform.isJavaVersionAtLeast(11); return isFlagEnabled( - "dd.telemetry.log-collection.enabled", "DD_TELEMETRY_LOG_COLLECTION_ENABLED", defaultValue); + "dd.instrumentation.telemetry.enabled", "DD_INSTRUMENTATION_TELEMETRY_ENABLED", true) + && isFlagEnabled( + "dd.telemetry.log-collection.enabled", "DD_TELEMETRY_LOG_COLLECTION_ENABLED", true); } private static boolean isFlagEnabled( diff --git a/internal-api/src/main/java/datadog/trace/api/Config.java b/internal-api/src/main/java/datadog/trace/api/Config.java index f6388e42945..a2f83aca90c 100644 --- a/internal-api/src/main/java/datadog/trace/api/Config.java +++ b/internal-api/src/main/java/datadog/trace/api/Config.java @@ -1676,6 +1676,11 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment()) telemetryMetricsEnabled = configProvider.getBoolean(GeneralConfig.TELEMETRY_METRICS_ENABLED, true); + isTelemetryLogCollectionEnabled = + instrumenterConfig.isTelemetryEnabled() + && configProvider.getBoolean( + TELEMETRY_LOG_COLLECTION_ENABLED, DEFAULT_TELEMETRY_LOG_COLLECTION_ENABLED); + isTelemetryDependencyServiceEnabled = configProvider.getBoolean( TELEMETRY_DEPENDENCY_COLLECTION_ENABLED, @@ -2007,24 +2012,6 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment()) debuggerThirdPartyIncludes = tryMakeImmutableSet(configProvider.getList(THIRD_PARTY_INCLUDES)); debuggerThirdPartyExcludes = tryMakeImmutableSet(configProvider.getList(THIRD_PARTY_EXCLUDES)); - // FIXME: For the initial rollout, we default log collection to true for IAST and CI Visibility - // users. - // FIXME: For progressive rollout, we include by default Java < 11 hosts as product independent - // sample users. - // FIXME:This should be removed once we default to true, and then it can also be moved up - // together with the rest of telemetry config. - final boolean telemetryLogCollectionEnabledDefault = - instrumenterConfig.isTelemetryEnabled() - && (instrumenterConfig.getAppSecActivation() == ProductActivation.FULLY_ENABLED - || instrumenterConfig.getIastActivation() == ProductActivation.FULLY_ENABLED - || instrumenterConfig.isCiVisibilityEnabled() - || debuggerEnabled - || !Platform.isJavaVersionAtLeast(11)) - || DEFAULT_TELEMETRY_LOG_COLLECTION_ENABLED; - isTelemetryLogCollectionEnabled = - configProvider.getBoolean( - TELEMETRY_LOG_COLLECTION_ENABLED, telemetryLogCollectionEnabledDefault); - awsPropagationEnabled = isPropagationEnabled(true, "aws", "aws-sdk"); sqsPropagationEnabled = isPropagationEnabled(true, "sqs");