You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent): memory leaks and optimize resource usage with Datadog/Pyroscope integrations (#351)
* an attempt to fix memory leak
* add pyroscope profiler support
* use protobuf instead of application/json for api access and try to avoid retaining list items
* fallback to json in case protobuf is not accepted
* update pyroscope config
* fix lint
* use single content type for k8s config
* improve retry watcher list and k8s config
* try using watch with initial list without dedicated list
* start with empty resource version to get synthetic list first
* revert retry watcher changes
* add some more grafana metrics and decrease watcher restart attempts
* disable RetryListerWatcher and use raw RetryWatcher
* revert parts of the objeststatusreporter logic and use original reporter for cli utils
* `revert some changes and start from scratch`
* `revert some more code`
* `refactor: enhance RetryListerWatcher with stop logic and improve watcher handling while cleaning up unused metrics`
* refactor: fix lint issues, clean up imports, and improve cache and reconciliation logic
* fix: add buffer size to resultChan in RetryListerWatcher to prevent potential blocking
* feat: add Datadog profiling integration to deployment-operator agent
* chore(dependencies): update go module dependencies in go.sum
* feat: update Datadog profiler to support custom agent address configuration
* `feat(agent): add Datadog tracer initialization and refactor Datadog address to host configuration`
* feat: add service name and environment configuration to Datadog tracer setup
* `chore: update go module dependencies to the latest compatible versions`
* refactor: update Datadog tracer and profiler initialization with improved address handling and unified configuration
* fix(datadog): correct argument assignment for tracer setup in deployment-operator agent configuration
* fix(datadog): correct argument assignment for tracer setup in deployment-operator agent configuration
* feat: add support for configurable Datadog environment with new `datadog-env` flag
* feat: integrate Kubernetes client tracing with DataDog and update dependencies
* `refactor: move Kubernetes client trace setup closer to initialization for improved code clarity`
* `fix: update cache expiration logic to refresh timestamps and retain entries with cleared specific fields`
* `feat: add tracing to RetryListerWatcher for improved observability`
* feat(retry-watcher): add context support, enhance synchronization, and improve cleanup handling
* `ci: update golangci-lint-action to v7.0.0 and linter version to v2.3.4`
* ci: downgrade golangci-lint-action to v2.1.2 in workflow configuration
* fix(args): change default value of Datadog integration flag to false
* `test: fix test initialization by moving Init call to BeforeAll setup`
* fix(watcher): improve stop handling and add tracing in RetryListerWatcher
* feat: add profiling period and CPU duration configuration to Datadog profiler setup
* add prealloc linter
* fix prealloc issues
* add more linters
* `fix: use thread-safe check for watcher started status`
* test: move Init invocation to specific test cases in resource_cache_test
* feat: add environment variable support for feature toggles in deployment operator flags
* add more linters
* refactor(agent): remove protobuf content type configuration from agent main setup
* refactor: remove Datadog tracing spans from RetryListerWatcher implementation
---------
Co-authored-by: Marcin Maciaszczyk <[email protected]>
argEnableLeaderElection=flag.Bool("leader-elect", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
58
-
argLocal=flag.Bool("local", false, "Whether you're running the operator locally.")
59
-
argProfiler=flag.Bool("profiler", false, "Enable pprof handler. By default it will be exposed on localhost:7777 under '/debug/pprof'")
60
-
argDisableResourceCache=flag.Bool("disable-resource-cache", false, "Control whether resource cache should be enabled or not.")
67
+
argLocal=flag.Bool("local", helpers.GetPluralEnvBool(EnvLocal, false), "Whether you're running the operator locally.")
68
+
argProfiler=flag.Bool("profiler", helpers.GetPluralEnvBool(EnvProfilerEnabled, false), "Enable pprof handler. By default it will be exposed on localhost:7777 under '/debug/pprof'")
69
+
argPyroscope=flag.Bool("pyroscope", helpers.GetPluralEnvBool(EnvPyroscopeEnabled, false), "Enable pyroscope integration for detailed application profiling. By default it will push to http://pyroscope.monitoring.svc.cluster.local:4040")
70
+
argDatadog=flag.Bool("datadog", helpers.GetPluralEnvBool(EnvDatadogEnabled, false), "Enable datadog integration for detailed application profiling. By default it will push to http://datadog.monitoring.svc.cluster.local:8125")
71
+
argDisableResourceCache=flag.Bool("disable-resource-cache", !helpers.GetPluralEnvBool(EnvResourceCacheEnabled, true), "Control whether resource cache should be enabled or not.")
61
72
argEnableKubecostProxy=flag.Bool("enable-kubecost-proxy", false, "If set, will proxy a Kubecost API request through the K8s API server.")
62
73
63
74
argMaxConcurrentReconciles=flag.Int("max-concurrent-reconciles", 20, "Maximum number of concurrent reconciles which can be run.")
@@ -78,6 +89,9 @@ var (
78
89
argControllerCacheTTL=flag.String("controller-cache-ttl", defaultControllerCacheTTL, "The time to live of console controller cache entries.")
79
90
argRestoreNamespace=flag.String("restore-namespace", defaultRestoreNamespace, "The namespace where Velero restores are located.")
80
91
argServices=flag.String("services", "", "A comma separated list of service ids to reconcile. Leave empty to reconcile all.")
92
+
argPyroscopeAddress=flag.String("pyroscope-address", defaultPyroscopeAddress, "The address of the Pyroscope server.")
93
+
argDatadogHost=flag.String("datadog-host", defaultDatadogHost, "The address of the Datadog server.")
94
+
argDatadogEnv=flag.String("datadog-env", defaultDatadogEnv, "The environment of the Datadog server.")
0 commit comments