-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Package: serverlessIssues related to the Sentry Serverless SDKIssues related to the Sentry Serverless SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.
@sentry/serverless
SDK Version
7.45.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
AWSLambda.init({
dsn: env.get('SENTRY_DSN'),
tracesSampleRate: 1.0,
environment: env.get('ENVIRONMENT_NAME'),
normalizeDepth: 0,
release: env.get('SENTRY_RELEASE'),
beforeSend(event, hint) {
const originalException = hint.originalException;
if (originalException instanceof CrmApiError && !originalException.sendToSentry) {
// Some exceptions are known errors than can occur during runtime.
// We don't want to pollute Sentry with these issues, these errors have 'sendToSentry' set to false
return null;
}
return event;
},
maxValueLength: 500, // default is 250, avoids cutting of Error's with a long 'message',
integrations: [
// Nodejs stacktraces by default point towards `/var/task/index.js`
// We have to change this path so that it corresponds to the uploaded sourcemaps in Sentry. See .gitlab-ci.yml
new RewriteFrames({
root: '/var/task',
prefix: `app:///${env.get('SENTRY_FUNCTION_ID')}/`,
}),
],
});Steps to Reproduce
Wrap an AWS lambda handler using and throw an Error:
AWSLambda.wrapHandler(..., {
captureAllSettledReasons: true,
})Expected Result
Lambda does not fail
Actual Result
{
"errorType": "TypeError",
"errorMessage": "Cannot read properties of undefined (reading 'finish')",
"trace": [
"TypeError: Cannot read properties of undefined (reading 'finish')",
" at Runtime.handler (/var/task/index.js:28:35554)"
]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Package: serverlessIssues related to the Sentry Serverless SDKIssues related to the Sentry Serverless SDK
Fields
Give feedbackNo fields configured for issues without a type.