-
Notifications
You must be signed in to change notification settings - Fork 35
Description
The ELASTIC_APM_EXTENSION_TIMEOUT_SECONDS
env variable allows users to set timeout values
apm-aws-lambda/apm-lambda-extension/extension/http_server.go
Lines 55 to 60 in 63afa0a
timeout := time.Duration(config.dataReceiverTimeoutSeconds) * time.Second | |
s := &http.Server{ | |
Addr: config.dataReceiverServerPort, | |
Handler: &handler, | |
ReadTimeout: timeout, | |
WriteTimeout: timeout, |
We should either
-
Rename this variable to more clear express it's intent, @felixbarny suggested
ELASTIC_APM_EXTENSION_TIMEOUT_SECONDS
-
Reconsider whether it's needed
This variable was created early in development, and the default value picked was "something a little bit longer than the max time an agent may keep a connection open. Depending on how consistent the agents are in the env naming, we may be able to look at the value set for ELASTIC_APM_API_REQUEST_TIME
(or use the default of 10s when it's not set) and just add an additional second to ensure the HTTP Server's timeout is a little bit longer than the max agent requests time.