apm-agent-nodejs
apm-agent-nodejs copied to clipboard
lambda: `context.fail()` without passing an error will result in trans.{result,outcome} being set to success
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.