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
Load the lambda layer 241 and initialize as documented -r @sentry/aws-serverless/awslambda-auto
Apparently, although the dependencies are correctly stated in the package.json of the @sentry/aws-serverless package, the lambda layer bundle only contains the @sentry/aws-serverless package with no dependencies from it.
Expected Result
The lambda is initialized and instrumented correctly
Actual Result
node:internal/modules/cjs/loader:1031
--
throw err;
^
Error: Cannot find module '@sentry/node'
Require stack:
- /opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js
- internal/preload
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js:1:14)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at internalRequire (node:internal/modules/cjs/loader:169:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js',
'internal/preload'
]
}
The text was updated successfully, but these errors were encountered:
Hey @JoaquinFernandez thanks for writing in and reporting! We identified and fixed the issue in #12083. We're releasing 8.2.0 right now but will right after that release 8.2.1 which will include this fix.
Sorry for the inconvenience!
Your issue btw also served as a reminder that we need to isolate future v7 layer releases to not release under the same AWS lambda layer name. Otherwise we'd break v8 users. We'll also follow up with this a bit later.
We previously adjusted our lambda layer auto initialization in
#12017. This
unfortunately changed the build output of the `awslambda-auto`
bootstrapping script which required a package that isn't included in the
layer (`@sentry/node`). This PR fixes the `awslambda-auto` file; local
testing showed no more imports from `@sentry/node`.
fixes#12074
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
8.1.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
-r @sentry/aws-serverless/awslambda-auto
Apparently, although the dependencies are correctly stated in the package.json of the
@sentry/aws-serverless
package, the lambda layer bundle only contains the@sentry/aws-serverless
package with no dependencies from it.Expected Result
The lambda is initialized and instrumented correctly
Actual Result
The text was updated successfully, but these errors were encountered: