Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully disable the sidecar on lambda by setting all related configs to false #2948

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading