Skip to content

feat(v8/bun): Update @sentry/bun to use OTEL node #10997

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 13 commits into from
Mar 13, 2024

Conversation

AbhiPrasad
Copy link
Member

ref #9956

Given Bun is just a wrapper over Node, we should be good to go with just these changes.

@AbhiPrasad AbhiPrasad requested a review from a team March 8, 2024 19:40
@AbhiPrasad AbhiPrasad self-assigned this Mar 8, 2024
@AbhiPrasad AbhiPrasad requested review from stephanie-anderson and s1gr1d and removed request for a team March 8, 2024 19:40
@AbhiPrasad
Copy link
Member Author

yarn run v1.22.21
$ 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/bun" 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.

Very confused why this error is happening. Cache issue? 🤔

@timfish
Copy link
Collaborator

timfish commented Mar 11, 2024

Run a yarn clean && yarn build:dev and take a look at the output directories?

I've had this a few times recently and for me it was caused by a Rollup bug where preserveModules + a module not marked as external causing the output directory structure to be completely wrong.

@AbhiPrasad
Copy link
Member Author

Well TIL about this

// remove cjs from config array config[0].output.format == cjs
export default [config[1]];

I assume that is what is causing issues.

@@ -8,6 +7,9 @@ import * as SentryRemix from '@sentry/remix';
import * as SentryServerless from '@sentry/serverless';
import * as SentrySvelteKit from '@sentry/sveltekit';

// Using CJS export for Bun SDK
const SentryBun = require('@sentry/bun');
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why CI is failing, trying this to see if it helps.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was timing out in CI for me yesterday. I tried it locally and it passed and then tried for a 4th time in CI and it passed there too 🤔

@AbhiPrasad
Copy link
Member Author

Found the bug! I was accidently importing node-experimental 🤦

@AbhiPrasad AbhiPrasad force-pushed the abhi-bun-sentry-node branch from 662a7e6 to 2493d65 Compare March 12, 2024 18:44
@AbhiPrasad AbhiPrasad merged commit 7879791 into develop Mar 13, 2024
@AbhiPrasad AbhiPrasad deleted the abhi-bun-sentry-node branch March 13, 2024 15:11
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.

3 participants