Skip to content

Commit

Permalink
internal/remoteconfig: support for DD_REMOTE_CONFIGURATION_ENABLED
Browse files Browse the repository at this point in the history
Signed-off-by: Eliott Bouhana <[email protected]>
  • Loading branch information
eliottness committed Jan 2, 2025
1 parent 4f57a47 commit d9ea482
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/remoteconfig/remoteconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"sync"
"time"

"gopkg.in/DataDog/dd-trace-go.v1/internal"
"gopkg.in/DataDog/dd-trace-go.v1/internal/log"

rc "github.com/DataDog/datadog-agent/pkg/remoteconfig/state"
Expand Down Expand Up @@ -187,6 +188,10 @@ func Start(config ClientConfig) error {
if err != nil {
return
}
if !internal.BoolEnv("DD_REMOTE_CONFIGURATION_ENABLED", true) {
// Don't start polling if the feature is disabled explicitly
return
}
go func() {
ticker := time.NewTicker(client.PollInterval)
defer ticker.Stop()
Expand Down

0 comments on commit d9ea482

Please sign in to comment.