You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Lambda function has a "Handler" string (set on the _HANDLER envvar in the Lambda invocation process) that indicates the location of the handler function (both its module file location, and the export lookup path inside that module).
E.g. some/subdir/filename.handlerFunctionName points to a JS module at $LAMBDA_TASK_ROOT/some/subdir/filename.{js,cjs,mjs} and the handlerFunctionName export from that module.
The APM agent's processing of that handler string breaks if there is a period (.) in the module path. For example, this works:
_HANDLER="src/functions/myfunc/handler.main"
but this does not:
_HANDLER="./src/functions/myfunc/handler.main"
I suspect also that this would fail, but I have not tested.
Then no Lambda transaction is created, and then (typically) any additional spans from other instrumentation will not get created for lack of a current transaction.
The text was updated successfully, but these errors were encountered:
…e path
Before this if the _HANDLER string had a '.' in the module path (the
part before the 'moduleName.functionExport'), then the parsing of
that handler string would silently produce bogus 'lambdaHandlerInfo'
that would result in a RITM path that would never actually get loaded,
hence no Lambda instrumentation.
Fixes: #4293
A Lambda function has a "Handler" string (set on the
_HANDLER
envvar in the Lambda invocation process) that indicates the location of the handler function (both its module file location, and the export lookup path inside that module).E.g.
some/subdir/filename.handlerFunctionName
points to a JS module at$LAMBDA_TASK_ROOT/some/subdir/filename.{js,cjs,mjs}
and thehandlerFunctionName
export from that module.The APM agent's processing of that handler string breaks if there is a period (
.
) in the module path. For example, this works:_HANDLER="src/functions/myfunc/handler.main"
but this does not:
_HANDLER="./src/functions/myfunc/handler.main"
I suspect also that this would fail, but I have not tested.
_HANDLER="src/functions/my.other.func/handler.main"
The symptom is that a Lambda function setup to be instrumented by the Node.js APM agent does not show this log.debug:
Then no Lambda transaction is created, and then (typically) any additional spans from other instrumentation will not get created for lack of a current transaction.
The text was updated successfully, but these errors were encountered: