Skip to content

Commit

Permalink
feat(aws-lambda): added ability to configure extension timeout
Browse files Browse the repository at this point in the history
- I saw a couple of timeouts while testing

> The Instana Lambda extension Heartbeat request did not succeed. Falling back to talking to the Instana back end directly. Error: The Lambda extension Heartbeat request timed out.

- added INSTANA_LAMBDA_EXTENSION_TIMEOUT_IN_MS
- increased the default timeout to 500ms
  • Loading branch information
kirrg001 committed Jun 13, 2024
1 parent 60c99f4 commit c102c60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/serverless/src/backend_connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ let useLambdaExtension = false;

const timeoutEnvVar = 'INSTANA_TIMEOUT';
let defaultTimeout = 500;
const layerExtensionTimeout = 300;
const layerExtensionTimeout = process.env.INSTANA_LAMBDA_EXTENSION_TIMEOUT_IN_MS
? Number(process.env.INSTANA_LAMBDA_EXTENSION_TIMEOUT_IN_MS)
: 500;
let backendTimeout = defaultTimeout;

const proxyEnvVar = 'INSTANA_ENDPOINT_PROXY';
Expand Down

0 comments on commit c102c60

Please sign in to comment.