-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(onboarding): Simplify Node AWS Lambda onboarding docs #98348
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
Conversation
}, | ||
} satisfies BasePlatformOptions; | ||
|
||
type PlatformOptions = typeof platformOptions; | ||
type Params = DocsParams<PlatformOptions>; | ||
|
||
const getEnvSetupSnippet = (params: Params) => ` | ||
NODE_OPTIONS="-r @sentry/aws-serverless/awslambda-auto" | ||
NODE_OPTIONS="--import @sentry/aws-serverless/awslambda-auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Lambda Auto-Instrumentation Fails with ES Module Flag
The NODE_OPTIONS
flag changed from -r
to --import
. Since --import
is specific to ES Modules and -r
works for both CommonJS and ES Modules, this change could prevent auto-instrumentation from loading correctly in existing CommonJS AWS Lambda functions, potentially causing them to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--import
works correctly for both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🙌
Simplifies and refactors the Node AWS Lambda onboarding docs to reflect that: - The Lambda layer supports both ESM and CJS, no need to differentiate based on this anymore - The SDK supports automatic wrapping for both ESM and CJS, no need to show manual setup in onboarding anymore closes https://linear.app/getsentry/issue/FE-592/update-aws-onboarding-docs
Simplifies and refactors the Node AWS Lambda onboarding docs to reflect that: - The Lambda layer supports both ESM and CJS, no need to differentiate based on this anymore - The SDK supports automatic wrapping for both ESM and CJS, no need to show manual setup in onboarding anymore closes https://linear.app/getsentry/issue/FE-592/update-aws-onboarding-docs
Simplifies and refactors the Node AWS Lambda onboarding docs to reflect that:
closes https://linear.app/getsentry/issue/FE-592/update-aws-onboarding-docs