Skip to content

Commit

Permalink
Fully disable the sidecar on lambda by setting all related configs to…
Browse files Browse the repository at this point in the history
… false

It doesn't work properly there, so just disable it until we fix it.

Signed-off-by: Bob Weinand <[email protected]>
  • Loading branch information
bwoebi committed Nov 13, 2024
1 parent e2b0a15 commit a8c8ea5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions appsec/src/extension/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ static void _register_testing_objects(void);

bool dd_config_minit(int module_number)
{
// We have to disable remote config by default on lambda due to issues with the sidecar there. We'll eventually fix it though.
if (getenv("AWS_LAMBDA_FUNCTION_NAME")) {
config_entries[DDAPPSEC_CONFIG_DD_REMOTE_CONFIG_ENABLED].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
}

if (!zai_config_minit(config_entries,
(sizeof config_entries / sizeof *config_entries),
dd_ini_env_to_ini_name, module_number)) {
Expand Down
2 changes: 2 additions & 0 deletions ext/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ bool ddtrace_config_minit(int module_number) {
#ifndef _WIN32
// Sidecar is currently broken - no traces sent. Investigation pending, background sender just works though.
if (getenv("AWS_LAMBDA_FUNCTION_NAME")) {
config_entries[DDTRACE_CONFIG_DD_REMOTE_CONFIG_ENABLED].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
config_entries[DDTRACE_CONFIG_DD_TRACE_SIDECAR_TRACE_SENDER].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
config_entries[DDTRACE_CONFIG_DD_INSTRUMENTATION_TELEMETRY_ENABLED].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("false");
}
#endif

Expand Down

0 comments on commit a8c8ea5

Please sign in to comment.