Skip to content

Commit

Permalink
internal/civisibility: change the default value for DD_CIVISIBILITY_E…
Browse files Browse the repository at this point in the history
…NABLED to false (#2893)
  • Loading branch information
tonyredondo authored Sep 27, 2024
1 parent 043dcd1 commit 82f0b8e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 82f0b8e

Please sign in to comment.