Skip to content

Commit ca48d25

Browse files
authored
Enable the sidecar sender by default on AWS lambda (#3147)
Signed-off-by: Bob Weinand <[email protected]>
1 parent b3401a4 commit ca48d25

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

appsec/src/extension/configuration.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,6 @@ 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
220-
// the sidecar there. We'll eventually fix it though.
221-
if (getenv("AWS_LAMBDA_FUNCTION_NAME")) { // NOLINT
222-
config_entries[DDAPPSEC_CONFIG_DD_REMOTE_CONFIG_ENABLED]
223-
.default_encoded_value = (zai_str)ZAI_STR_FROM_CSTR("false");
224-
}
225-
226219
if (!zai_config_minit(config_entries,
227220
(sizeof config_entries / sizeof *config_entries),
228221
dd_ini_env_to_ini_name, module_number)) {

ext/configuration.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,9 @@ bool ddtrace_config_minit(int module_number) {
181181
}
182182

183183
#ifndef _WIN32
184-
// Sidecar is currently broken - no traces sent. Investigation pending, background sender just works though.
184+
// Background sender does not send a Content-Length header, but sidecar does. Force-enable it thus, as the background sender does not work at all.
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");
187-
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");
186+
config_entries[DDTRACE_CONFIG_DD_TRACE_SIDECAR_TRACE_SENDER].default_encoded_value = (zai_str) ZAI_STR_FROM_CSTR("true");
189187
}
190188
#endif
191189

0 commit comments

Comments
 (0)