Skip to content

Commit

Permalink
feat: Check for LAMBDA_TASK_ROOT before patching (#4157)
Browse files Browse the repository at this point in the history
  • Loading branch information
astuyve authored and juan-fernandez committed Mar 20, 2024
1 parent 5e68c04 commit dc52efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dd-trace/src/lambda/runtime/ritm.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const registerLambdaHook = () => {
const lambdaTaskRoot = process.env.LAMBDA_TASK_ROOT
const originalLambdaHandler = process.env.DD_LAMBDA_HANDLER

if (originalLambdaHandler !== undefined) {
if (originalLambdaHandler !== undefined && lambdaTaskRoot !== undefined) {
const [moduleRoot, moduleAndHandler] = _extractModuleRootAndHandler(originalLambdaHandler)
const [_module] = _extractModuleNameAndHandlerPath(moduleAndHandler)

Expand Down

0 comments on commit dc52efb

Please sign in to comment.