Skip to content

Conversation

msonnb
Copy link
Member

@msonnb msonnb commented Aug 27, 2025

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

@msonnb msonnb self-assigned this Aug 27, 2025
@msonnb msonnb requested a review from a team as a code owner August 27, 2025 15:08
Copy link

linear bot commented Aug 27, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 27, 2025
cursor[bot]

This comment was marked as outdated.

},
} 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"
Copy link
Contributor

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.

Fix in Cursor Fix in Web

Copy link
Member Author

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

Copy link
Member

@ArthurKnaus ArthurKnaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🙌

@msonnb msonnb merged commit 0fba75e into master Aug 28, 2025
46 checks passed
@msonnb msonnb deleted the ms/node-aws-onboarding branch August 28, 2025 06:29
kenzoengineer pushed a commit that referenced this pull request Aug 28, 2025
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
andrewshie-sentry pushed a commit that referenced this pull request Aug 28, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants