-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
Description
Description
With the v8 major of the sentry-javascript SDKs, we introduced a version check for node lambda layers to use the correct package when setting NODE_OPTIONS.
With the v8 major we also started publishing a second node layer named SentryNodeServerlessSDKv7 which is a practice we are continuing withe the upcoming v9 major.
Problem
The current check doesn't consider which layer is active. If users use one of the newly published major layers (with lower ARN version numbers, e.g. arn:...:SentryNodeServerlessSDKv8:4 the check falsely detects the what SDK package should be used for the NODE_OPTIONS.
Solution Brainstorming
We should also check the layer's name in addition to the ARN version:
SentryNodeServerlessSDKv7should set"NODE_OPTIONS": "-r @sentry/serverless/dist/awslambda-auto"SentryNodeServerlessSDKand ARN version<= 235should set"NODE_OPTIONS": "-r @sentry/serverless/dist/awslambda-auto"- Any other layer should use
"NODE_OPTIONS": "-r @sentry/aws-serverless/awslambda-auto"