From 82f0b8eb97f156f3596fd227a1b7424fe7a5fdba Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Fri, 27 Sep 2024 09:51:33 +0200 Subject: [PATCH] internal/civisibility: change the default value for DD_CIVISIBILITY_ENABLED to false (#2893) --- .../civisibility/integrations/gotesting/instrumentation.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/civisibility/integrations/gotesting/instrumentation.go b/internal/civisibility/integrations/gotesting/instrumentation.go index 50531796c1..5f1d2bf849 100644 --- a/internal/civisibility/integrations/gotesting/instrumentation.go +++ b/internal/civisibility/integrations/gotesting/instrumentation.go @@ -61,11 +61,12 @@ func isCiVisibilityEnabled() bool { // let's check if the value has already been loaded from the env-vars enabledValue := atomic.LoadInt32(&ciVisibilityEnabledValue) if enabledValue == -1 { - // Get the DD_CIVISIBILITY_ENABLED env var, if not present we default to true. This is because if we are here, it means + // Get the DD_CIVISIBILITY_ENABLED env var, if not present we default to false (for now). This is because if we are here, it means // that the process was instrumented for ci visibility or by using orchestrion. // So effectively this env-var will act as a kill switch for cases where the code is instrumented, but // we don't want the civisibility instrumentation to be enabled. - if internal.BoolEnv(constants.CIVisibilityEnabledEnvironmentVariable, true) { + // *** For preview releases we will default to false, meaning that the use of ci visibility must be opt-in *** + if internal.BoolEnv(constants.CIVisibilityEnabledEnvironmentVariable, false) { atomic.StoreInt32(&ciVisibilityEnabledValue, 1) return true } else {