Skip to content

Commit 12362a5

Browse files
committed
fix: disable remote configuration by default in Lambda
Remote configuration relies on /dev/shm for shared memory, which is unavailable in AWS Lambda. Set DD_REMOTE_CONFIGURATION_ENABLED=false before ddtrace loads (following the same pattern used for DD_TRACE_STATS_COMPUTATION_ENABLED and DD_INSTRUMENTATION_TELEMETRY_ENABLED) so the tracer knows RC is disabled from the start. This is a defense-in-depth companion to the primary fix in dd-trace-py which skips the shared memory allocation entirely when in_aws_lambda() is detected. Resolves: #785
1 parent 354a074 commit 12362a5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

datadog_lambda/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ def _reset(self):
141141
"enabled" if config.fips_mode_enabled else "not enabled",
142142
)
143143

144+
# Remote configuration relies on /dev/shm which is unavailable in Lambda.
145+
# Disable it before ddtrace loads to avoid the shared-memory warning.
146+
if "DD_REMOTE_CONFIGURATION_ENABLED" not in os.environ:
147+
os.environ["DD_REMOTE_CONFIGURATION_ENABLED"] = "false"
148+
144149
# disable css to prevent double counting in lambda
145150
os.environ["DD_TRACE_STATS_COMPUTATION_ENABLED"] = "false"
146151

0 commit comments

Comments
 (0)