Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve version check for node lambda layer #82646

Open
andreiborza opened this issue Dec 30, 2024 · 0 comments
Open

Improve version check for node lambda layer #82646

andreiborza opened this issue Dec 30, 2024 · 0 comments

Comments

@andreiborza
Copy link
Member

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:

  • SentryNodeServerlessSDKv7 should set "NODE_OPTIONS": "-r @sentry/serverless/dist/awslambda-auto"
  • SentryNodeServerlessSDK and ARN version <= 235 should set "NODE_OPTIONS": "-r @sentry/serverless/dist/awslambda-auto"
  • Any other layer should use "NODE_OPTIONS": "-r @sentry/aws-serverless/awslambda-auto"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant