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
AWS adds their own `unhandledRejection` handlers to a lambda function which results in Sentry not being able to pick these up.
45
+
As a workaround, remove all handlers before initializing Sentry.
46
+
47
+
Unfortunately, this means the AWS Lambda handler has to be <PlatformLinkto="/install/cjs-layer/#alternative-initialize-the-sdk-in-code">manually wrapped</PlatformLink>.
48
+
49
+
```JavaScript
50
+
constSentry=require("@sentry/aws-serverless");
51
+
52
+
// Remove `unhandledRejection` handlers set up by AWS so the
53
+
// Sentry SDK can capture these
54
+
process.removeAllListeners("unhandledRejection");
55
+
56
+
Sentry.init({
57
+
dsn:"___PUBLIC_DSN___"
58
+
// Add Tracing by setting tracesSampleRate and adding integration
59
+
// Set tracesSampleRate to 1.0 to capture 100% of transactions
60
+
// We recommend adjusting this value in production
0 commit comments