elastic / elastic/apm-agent-nodejs
lambda: `context.fail()` without passing an error will result in trans.{result,outcome} being set to success
Open
agent-nodejs
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
The Lambda `context.fail(...)` method's `err` argument is optional:
https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/c31c41ffe5f2f03ae9e8589b96f3b005e2bb8a4a/src/Runtime/CallbackContext.ts#L108-L114
In our current instrumentation `endAndFlushTransaction` will misinterpret that as a success, and set `trans.result` and `trans.outcome` to success values.
Contributor guide
Assessment
This issue has not been assessed yet.