Skip to content

Commit 1980cea

Browse files
authored
feat: add ELASTIC_APM_LAMBDA_DISABLE_LOGS_API env var to disable logs api (#434)
* feat: add flag to disable logs api * refactor: parse boolean for consistency with other flags
1 parent 22b374b commit 1980cea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ func main() {
4747
app.WithAWSConfig(cfg),
4848
}
4949

50+
rawDisableLogsAPI := os.Getenv("ELASTIC_APM_LAMBDA_DISABLE_LOGS_API")
51+
if disableLogsAPI, _ := strconv.ParseBool(rawDisableLogsAPI); disableLogsAPI {
52+
appConfigs = append(appConfigs, app.WithoutLogsAPI())
53+
}
54+
5055
// ELASTIC_APM_LAMBDA_CAPTURE_LOGS indicate if the lambda extension
5156
// should capture logs, the value defaults to true i.e. the extension
5257
// will capture function logs by default

0 commit comments

Comments
 (0)