-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Expected Behavior
I am fiddling around to get Error Tracking working using aws-cdk-v2, datadog-cdk-construct-v2 and NodejsFunction.
It would be nice to have this integrated into this construct library.
I do not know if the following setup is supported at all as there is a related issue in the dd-trace-js repository.
Expected behaviour is: When using a NodeJS Lambda function, I want error tracking in Datadog to show the source code in the stack trace (even for a handler which was bundled and minified via esbuild).
The reason why I believe this is important: The current sourceCodeIntegration does not seem to work out-of-the-box. APM error tracking cannot make sense of the NodeJS Lambda stack traces.
Actual Behavior
There is no matching source code file or source map for the bundled, minified Lambda handler /var/task/index.js.
Steps to Reproduce the Problem
- Use the datadog construct with
.addGitCommitMetadata - Use a NodejsLambda with the following bundling options:
bundling: {
sourceMap: true,
sourceMapMode: SourceMapMode.DEFAULT,
sourcesContent: false,
externalModules: [
"dd-trace",
"@aws-sdk/client-dynamodb",
"@aws-sdk/client-s3",
"@aws-sdk/lib-dynamodb",
],
minify: true,
},
- Trigger an error span in APM for the Lambda function
Specifications
- Datadog Lambda Layer version: 51 (extension), 101 (node)
- Node version: 18
