Skip to content

Commit

Permalink
feat: add ELASTIC_APM_LAMBDA_DISABLE_LOGS_API env var to disable lo…
Browse files Browse the repository at this point in the history
…gs api (#434)

* feat: add flag to disable logs api

* refactor: parse boolean for consistency with other flags
  • Loading branch information
kruskall authored Jan 22, 2024
1 parent 22b374b commit 1980cea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ func main() {
app.WithAWSConfig(cfg),
}

rawDisableLogsAPI := os.Getenv("ELASTIC_APM_LAMBDA_DISABLE_LOGS_API")
if disableLogsAPI, _ := strconv.ParseBool(rawDisableLogsAPI); disableLogsAPI {
appConfigs = append(appConfigs, app.WithoutLogsAPI())
}

// ELASTIC_APM_LAMBDA_CAPTURE_LOGS indicate if the lambda extension
// should capture logs, the value defaults to true i.e. the extension
// will capture function logs by default
Expand Down

0 comments on commit 1980cea

Please sign in to comment.