Skip to content

feat(v8): Add @sentry/aws-serverless package #11052

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

Merged
merged 7 commits into from
Mar 12, 2024
Merged

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Mar 12, 2024

ref #10976

This change renames the @sentry/serverless SDK to be @sentry/aws-serverless and removes all GCP related code. It also adds a migration note detailing the changes we made.

It also updates the package to only emit CJS, because it relies on monkeypatching via require calls. We can add back ESM at a later point, will create follow up issue for it.

This PR does not touch any of the lambda layer code, I will come back and refactor it afterwards (too scary to think about right now)

Update: We will rename the @sentry/google-cloud package to @sentry/google-cloud-serverless in a follow up PR

@AbhiPrasad AbhiPrasad requested review from a team, mydea and stephanie-anderson and removed request for a team March 12, 2024 14:28
@AbhiPrasad
Copy link
Member Author

yarn run v1.22.22
$ pnpm test

> [email protected] test /home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/node-exports-test-app
>  bun run ./dist/consistentExports.js

error: Cannot find module "@sentry/aws-serverless" from "/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/node-exports-test-app/dist/consistentExports.js"
 ELIFECYCLE  Test failed. See above for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
##[debug]Finishing: Run E2E test

https://github.com/getsentry/sentry-javascript/actions/runs/8252529885/job/22573410288?pr=11052

Getting same error as I am in #10997

Let me try using require import

@AbhiPrasad
Copy link
Member Author

AbhiPrasad commented Mar 12, 2024

Might be a bun bug!

Update: It's not! it's because we needed to use require

@AbhiPrasad AbhiPrasad merged commit dcb6c24 into develop Mar 12, 2024
@AbhiPrasad AbhiPrasad deleted the abhi-aws-serverless branch March 12, 2024 18:42
@AbhiPrasad AbhiPrasad self-assigned this Mar 12, 2024
mydea pushed a commit that referenced this pull request Mar 13, 2024
…1065)

~Dependent on #11052
merging in~

ref #10976

renames `@sentry/google-cloud` to `@sentry/google-cloud-serverless` to
signify intent better.

This also fixes the package to be CJS only, as we directly include
`require` calls to make the instrumentation work.
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

Successfully merging this pull request may close these issues.

2 participants