Skip to content

Rename or Reconsider ELASTIC_APM_EXTENSION_TIMEOUT_SECONDS env Variable #61

@astorm

Description

@astorm

The ELASTIC_APM_EXTENSION_TIMEOUT_SECONDS env variable allows users to set timeout values

timeout := time.Duration(config.dataReceiverTimeoutSeconds) * time.Second
s := &http.Server{
Addr: config.dataReceiverServerPort,
Handler: &handler,
ReadTimeout: timeout,
WriteTimeout: timeout,

We should either

  1. Rename this variable to more clear express it's intent, @felixbarny suggested ELASTIC_APM_EXTENSION_TIMEOUT_SECONDS

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions