Skip to content

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Oct 23, 2025

closes #17066

Also updates the shared BuildTimeOptionsBase type a bit to align with the latest changes.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,290 - 9,386 -1%
GET With Sentry 1,420 15% 1,413 +0%
GET With Sentry (error only) 6,180 67% 6,155 +0%
POST Baseline 1,197 - 1,210 -1%
POST With Sentry 527 44% 528 -0%
POST With Sentry (error only) 1,080 90% 1,079 +0%
MYSQL Baseline 3,308 - 3,351 -1%
MYSQL With Sentry 502 15% 490 +2%
MYSQL With Sentry (error only) 2,770 84% 2,751 +1%

View base workflow run

@s1gr1d s1gr1d force-pushed the sig/align-rr-buildTime-options branch from 3a7fa72 to b3d44be Compare October 23, 2025 14:56
@s1gr1d s1gr1d marked this pull request as ready for review October 23, 2025 14:56
Copy link
Member Author

Choose a reason for hiding this comment

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

The changes in this file are basically just a back-port of the changes in the bundler-plugin type.

getsentry/sentry-javascript-bundler-plugins@main/packages/bundler-plugin-core/src/types.ts

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Looks good!

}
// delete sourcemaps after upload
let updatedFilesToDeleteAfterUpload = sourceMapsUploadOptions?.filesToDeleteAfterUpload;
let updatedFilesToDeleteAfterUpload = await sourcemaps?.filesToDeleteAfterUpload;
Copy link
Member

Choose a reason for hiding this comment

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

q: Why is this awaited?

Copy link
Member Author

Choose a reason for hiding this comment

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

As this can be a Promise when coming from the unstable_... option: getsentry/sentry-javascript-bundler-plugins@4255012

@s1gr1d s1gr1d merged commit 2c6e710 into develop Oct 24, 2025
195 checks passed
@s1gr1d s1gr1d deleted the sig/align-rr-buildTime-options branch October 24, 2025 08:31
Copy link
Member

@JPeer264 JPeer264 left a comment

Choose a reason for hiding this comment

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

I am a little late to the party. I leave this here for the record

...sentryConfig.sourcemaps,
...sourceMapsUploadOptions,
// eslint-disable-next-line deprecation/deprecation
disable: sourceMapsUploadOptions?.enabled === false ? true : sentryConfig.sourcemaps?.disable,
Copy link
Member

Choose a reason for hiding this comment

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

l: following would do the same and is a little shorter

Suggested change
disable: sourceMapsUploadOptions?.enabled === false ? true : sentryConfig.sourcemaps?.disable,
disable: sourceMapsUploadOptions?.enabled === false || sentryConfig.sourcemaps?.disable,


it('should start a span for data requests with active root span', async () => {
vi.spyOn(Util, 'isDataRequest').mockReturnValue(true);
// @ts-expect-error MockSpan just for testing
Copy link
Member

Choose a reason for hiding this comment

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

l: you could use new SentryCore.SentryNonRecordingSpan({ traceId: '1', spanId: '2' }) instead, then you can get rid of the ts-expect-error. But for that you need too adapt the mocking:

vi.mock('@sentry/core', async (importOriginal) => {
  return {
    ...(await importOriginal()),
    getActiveSpan: vi.fn(),
    ...
  };
});

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.

[ReactRouter]: Align build-time bundler plugin options

4 participants