Skip to content

Commit ea58159

Browse files
authored
Fully disable the sidecar on lambda by setting all related configs to false (#2948)
It doesn't work properly there, so just disable it until we fix it. Signed-off-by: Bob Weinand <[email protected]>
1 parent 0743066 commit ea58159

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

appsec/src/extension/configuration.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ static void _register_testing_objects(void);
216216

217217
bool dd_config_minit(int module_number)
218218
{
219+
// We have to disable remote config by default on lambda due to issues with the sidecar there. We'll eventually fix it though.
220+
if (getenv("AWS_LAMBDA_FUNCTION_NAME")) {
221+
config_entries[DDAPPSEC_CONFIG_DD_REMOTE_CONFIG_ENABLED].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
222+
}
223+
219224
if (!zai_config_minit(config_entries,
220225
(sizeof config_entries / sizeof *config_entries),
221226
dd_ini_env_to_ini_name, module_number)) {

ext/configuration.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ bool ddtrace_config_minit(int module_number) {
183183
#ifndef _WIN32
184184
// Sidecar is currently broken - no traces sent. Investigation pending, background sender just works though.
185185
if (getenv("AWS_LAMBDA_FUNCTION_NAME")) {
186+
config_entries[DDTRACE_CONFIG_DD_REMOTE_CONFIG_ENABLED].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
186187
config_entries[DDTRACE_CONFIG_DD_TRACE_SIDECAR_TRACE_SENDER].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
188+
config_entries[DDTRACE_CONFIG_DD_INSTRUMENTATION_TELEMETRY_ENABLED].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
187189
}
188190
#endif
189191

0 commit comments

Comments
 (0)