Skip to content

Commit de147c1

Browse files
authored
Merge branch 'develop' into sig/truncation-changes
2 parents d7e5cfe + 6360009 commit de147c1

File tree

74 files changed

+683
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+683
-219
lines changed

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ module.exports = [
197197
path: createCDNPath('bundle.tracing.replay.min.js'),
198198
gzip: false,
199199
brotli: false,
200-
limit: '240 KB',
200+
limit: '245 KB',
201201
},
202202
{
203203
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 10.23.0
8+
9+
- feat(core): Send `user-agent` header with envelope requests in server SDKs ([#17929](https://github.com/getsentry/sentry-javascript/pull/17929))
10+
- feat(browser): Limit transport buffer size ([#18046](https://github.com/getsentry/sentry-javascript/pull/18046))
11+
- feat(core): Remove default value of `maxValueLength: 250` ([#18043](https://github.com/getsentry/sentry-javascript/pull/18043))
12+
- feat(react-router): Align options with shared build time options type ([#18014](https://github.com/getsentry/sentry-javascript/pull/18014))
13+
- fix(browser-utils): cache element names for INP ([#18052](https://github.com/getsentry/sentry-javascript/pull/18052))
14+
- fix(browser): Capture unhandled rejection errors for web worker integration ([#18054](https://github.com/getsentry/sentry-javascript/pull/18054))
15+
- fix(cloudflare): Ensure types for cloudflare handlers ([#18064](https://github.com/getsentry/sentry-javascript/pull/18064))
16+
- fix(nextjs): Update proxy template wrapping ([#18086](https://github.com/getsentry/sentry-javascript/pull/18086))
17+
- fix(nuxt): Added top-level fallback exports ([#18083](https://github.com/getsentry/sentry-javascript/pull/18083))
18+
- fix(nuxt): check for H3 error cause before re-capturing ([#18035](https://github.com/getsentry/sentry-javascript/pull/18035))
19+
- fix(replay): Linked errors not resetting session id ([#17854](https://github.com/getsentry/sentry-javascript/pull/17854))
20+
- fix(tracemetrics): Bump metrics buffer to 1k ([#18039](https://github.com/getsentry/sentry-javascript/pull/18039))
21+
- fix(vue): Make `options` parameter optional on `attachErrorHandler` ([#18072](https://github.com/getsentry/sentry-javascript/pull/18072))
22+
- ref(core): Set span status `internal_error` instead of `unknown_error` ([#17909](https://github.com/getsentry/sentry-javascript/pull/17909))
23+
24+
<details>
25+
<summary> <strong>Internal Changes</strong> </summary>
26+
27+
- fix(tests): un-override nitro dep version for nuxt-3 test ([#18056](https://github.com/getsentry/sentry-javascript/pull/18056))
28+
- fix(e2e): Add p-map override to fix React Router 7 test builds ([#18068](https://github.com/getsentry/sentry-javascript/pull/18068))
29+
- feat: Add a note to save changes before starting ([#17987](https://github.com/getsentry/sentry-javascript/pull/17987))
30+
- test(browser): Add test for INP target name after navigation or DOM changes ([#18033](https://github.com/getsentry/sentry-javascript/pull/18033))
31+
- chore: Add external contributor to CHANGELOG.md ([#18032](https://github.com/getsentry/sentry-javascript/pull/18032))
32+
- chore(aws-serverless): Fix typo in timeout warning function name ([#18031](https://github.com/getsentry/sentry-javascript/pull/18031))
33+
- chore(browser): upgrade fake-indexeddb to v6 ([#17975](https://github.com/getsentry/sentry-javascript/pull/17975))
34+
- chore(tests): pass test flags through to the test command ([#18062](https://github.com/getsentry/sentry-javascript/pull/18062))
35+
36+
</details>
37+
738
Work in this release was contributed by @hanseo0507. Thank you for your contribution!
839

940
## 10.22.0

dev-packages/browser-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "10.22.0",
3+
"version": "10.23.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,7 +43,7 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "~1.53.2",
4545
"@sentry-internal/rrweb": "2.34.0",
46-
"@sentry/browser": "10.22.0",
46+
"@sentry/browser": "10.23.0",
4747
"@supabase/supabase-js": "2.49.3",
4848
"axios": "^1.12.2",
4949
"babel-loader": "^8.2.2",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1+
// This worker manually replicates what Sentry.registerWebWorker() does
2+
// (In real code with a bundler, you'd import and call Sentry.registerWebWorker({ self }))
3+
14
self._sentryDebugIds = {
25
'Error at http://sentry-test.io/worker.js': 'worker-debug-id-789',
36
};
47

8+
// Send debug IDs
59
self.postMessage({
610
_sentryMessage: true,
711
_sentryDebugIds: self._sentryDebugIds,
812
});
913

14+
// Set up unhandledrejection handler (same as registerWebWorker)
15+
self.addEventListener('unhandledrejection', event => {
16+
self.postMessage({
17+
_sentryMessage: true,
18+
_sentryWorkerError: {
19+
reason: event.reason,
20+
filename: self.location.href,
21+
},
22+
});
23+
});
24+
1025
self.addEventListener('message', event => {
1126
if (event.data.type === 'throw-error') {
1227
throw new Error('Worker error for testing');
1328
}
29+
30+
if (event.data.type === 'throw-rejection') {
31+
// Create an unhandled rejection
32+
Promise.reject(new Error('Worker unhandled rejection'));
33+
}
1434
});

dev-packages/browser-integration-tests/suites/integrations/webWorker/init.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ const worker = new Worker('/worker.js');
99

1010
Sentry.addIntegration(Sentry.webWorkerIntegration({ worker }));
1111

12-
const btn = document.getElementById('errWorker');
12+
const btnError = document.getElementById('errWorker');
13+
const btnRejection = document.getElementById('rejectionWorker');
1314

14-
btn.addEventListener('click', () => {
15+
btnError.addEventListener('click', () => {
1516
worker.postMessage({
1617
type: 'throw-error',
1718
});
1819
});
20+
21+
btnRejection.addEventListener('click', () => {
22+
worker.postMessage({
23+
type: 'throw-rejection',
24+
});
25+
});

dev-packages/browser-integration-tests/suites/integrations/webWorker/template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
</head>
66
<body>
77
<button id="errWorker">Throw error in worker</button>
8+
<button id="rejectionWorker">Throw unhandled rejection in worker</button>
89
</body>
910
</html>

dev-packages/browser-integration-tests/suites/integrations/webWorker/test.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,32 @@ sentryTest('Assigns web worker debug IDs when using webWorkerIntegration', async
3636
expect(image.code_file).toEqual('http://sentry-test.io/worker.js');
3737
});
3838
});
39+
40+
sentryTest('Captures unhandled rejections from web workers', async ({ getLocalTestUrl, page }) => {
41+
const bundle = process.env.PW_BUNDLE;
42+
if (bundle != null && !bundle.includes('esm') && !bundle.includes('cjs')) {
43+
sentryTest.skip();
44+
}
45+
46+
const url = await getLocalTestUrl({ testDir: __dirname });
47+
48+
const errorEventPromise = getFirstSentryEnvelopeRequest<Event>(page, url);
49+
50+
page.route('**/worker.js', route => {
51+
route.fulfill({
52+
path: `${__dirname}/assets/worker.js`,
53+
});
54+
});
55+
56+
const button = page.locator('#rejectionWorker');
57+
await button.click();
58+
59+
const errorEvent = await errorEventPromise;
60+
61+
// Verify the unhandled rejection was captured
62+
expect(errorEvent.exception?.values?.[0]?.value).toContain('Worker unhandled rejection');
63+
expect(errorEvent.exception?.values?.[0]?.mechanism?.type).toBe('auto.browser.web_worker.onunhandledrejection');
64+
expect(errorEvent.exception?.values?.[0]?.mechanism?.handled).toBe(false);
65+
expect(errorEvent.contexts?.worker).toBeDefined();
66+
expect(errorEvent.contexts?.worker?.filename).toContain('worker.js');
67+
});

dev-packages/bundle-analyzer-scenarios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/bundle-analyzer-scenarios",
3-
"version": "10.22.0",
3+
"version": "10.23.0",
44
"description": "Scenarios to test bundle analysis with",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",

dev-packages/clear-cache-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/clear-cache-gh-action",
33
"description": "An internal Github Action to clear GitHub caches.",
4-
"version": "10.22.0",
4+
"version": "10.23.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

dev-packages/cloudflare-integration-tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/cloudflare-integration-tests",
3-
"version": "10.22.0",
3+
"version": "10.23.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=18"
@@ -13,11 +13,11 @@
1313
"test:watch": "yarn test --watch"
1414
},
1515
"dependencies": {
16-
"@sentry/cloudflare": "10.22.0"
16+
"@sentry/cloudflare": "10.23.0"
1717
},
1818
"devDependencies": {
1919
"@cloudflare/workers-types": "^4.20250922.0",
20-
"@sentry-internal/test-utils": "10.22.0",
20+
"@sentry-internal/test-utils": "10.23.0",
2121
"vitest": "^3.2.4",
2222
"wrangler": "4.22.0"
2323
},

0 commit comments

Comments
 (0)