Skip to content

Commit

Permalink
feat(errortracking): Enable error tracking for Java < 11 by default (#…
Browse files Browse the repository at this point in the history
…7475)

This starts a progressive rollout using product independent sample.
  • Loading branch information
PerfectSlayer authored Aug 22, 2024
1 parent 2cf870d commit 5f75847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,15 @@ public void reinitialize() {
// 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
// users. This should be removed once we default to true.
// 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.civisibility.enabled", "DD_CIVISIBILITY_ENABLED", false)
|| isFlagEnabled(
"dd.dynamic.instrumentation.enabled", "DD_DYNAMIC_INSTRUMENTATION_ENABLED", false);
"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);
}
Expand Down
10 changes: 7 additions & 3 deletions internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -1993,13 +1993,17 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
debuggerThirdPartyExcludes = tryMakeImmutableSet(configProvider.getList(THIRD_PARTY_EXCLUDES));

// FIXME: For the initial rollout, we default log collection to true for IAST and CI Visibility
// users. This should be removed once we default to true, and then it can also be moved up
// together with the rest of telemetry ocnfig.
// 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.getIastActivation() == ProductActivation.FULLY_ENABLED
|| instrumenterConfig.isCiVisibilityEnabled()
|| debuggerEnabled)
|| debuggerEnabled
|| !Platform.isJavaVersionAtLeast(11))
|| DEFAULT_TELEMETRY_LOG_COLLECTION_ENABLED;
isTelemetryLogCollectionEnabled =
configProvider.getBoolean(
Expand Down

0 comments on commit 5f75847

Please sign in to comment.