Skip to content

Commit 22f80b8

Browse files
authored
Merge pull request #18820 from getsentry/prepare-release/10.34.0
meta(changelog): Update changelog for 10.34.0
2 parents 3e9e8f6 + f9e4fc1 commit 22f80b8

File tree

68 files changed

+2975
-1100
lines changed

Some content is hidden

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

68 files changed

+2975
-1100
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ jobs:
568568
- bundle_min
569569
- bundle_replay
570570
- bundle_tracing
571+
- bundle_tracing_logs_metrics
571572
- bundle_tracing_replay
572573
- bundle_tracing_replay_feedback
573574
- bundle_tracing_replay_feedback_min

.size-limit.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = [
88
path: 'packages/browser/build/npm/esm/prod/index.js',
99
import: createImport('init'),
1010
gzip: true,
11-
limit: '25 KB',
11+
limit: '25.5 KB',
1212
},
1313
{
1414
name: '@sentry/browser - with treeshaking flags',
@@ -148,7 +148,7 @@ module.exports = [
148148
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
149149
ignore: ['react/jsx-runtime'],
150150
gzip: true,
151-
limit: '44 KB',
151+
limit: '44.5 KB',
152152
},
153153
// Vue SDK (ESM)
154154
{
@@ -171,20 +171,26 @@ module.exports = [
171171
path: 'packages/svelte/build/esm/index.js',
172172
import: createImport('init'),
173173
gzip: true,
174-
limit: '25 KB',
174+
limit: '25.5 KB',
175175
},
176176
// Browser CDN bundles
177177
{
178178
name: 'CDN Bundle',
179179
path: createCDNPath('bundle.min.js'),
180180
gzip: true,
181-
limit: '27.5 KB',
181+
limit: '28 KB',
182182
},
183183
{
184184
name: 'CDN Bundle (incl. Tracing)',
185185
path: createCDNPath('bundle.tracing.min.js'),
186186
gzip: true,
187-
limit: '42.5 KB',
187+
limit: '43 KB',
188+
},
189+
{
190+
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
191+
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
192+
gzip: true,
193+
limit: '44 KB',
188194
},
189195
{
190196
name: 'CDN Bundle (incl. Tracing, Replay)',
@@ -213,6 +219,13 @@ module.exports = [
213219
brotli: false,
214220
limit: '127 KB',
215221
},
222+
{
223+
name: 'CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed',
224+
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
225+
gzip: false,
226+
brotli: false,
227+
limit: '130 KB',
228+
},
216229
{
217230
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
218231
path: createCDNPath('bundle.tracing.replay.min.js'),
@@ -234,7 +247,7 @@ module.exports = [
234247
import: createImport('init'),
235248
ignore: ['next/router', 'next/constants'],
236249
gzip: true,
237-
limit: '46.5 KB',
250+
limit: '47 KB',
238251
},
239252
// SvelteKit SDK (ESM)
240253
{
@@ -243,7 +256,7 @@ module.exports = [
243256
import: createImport('init'),
244257
ignore: ['$app/stores'],
245258
gzip: true,
246-
limit: '42.5 KB',
259+
limit: '43 KB',
247260
},
248261
// Node-Core SDK (ESM)
249262
{
@@ -261,7 +274,7 @@ module.exports = [
261274
import: createImport('init'),
262275
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
263276
gzip: true,
264-
limit: '162.5 KB',
277+
limit: '163 KB',
265278
},
266279
{
267280
name: '@sentry/node - without tracing',

CHANGELOG.md

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

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

7+
## 10.34.0
8+
9+
### Important Changes
10+
11+
- **feat(core): Add option to enhance the fetch error message ([#18466](https://github.com/getsentry/sentry-javascript/pull/18466))**
12+
13+
You can now enable enhanced fetch error messages by setting the `enhancedFetchErrorMessage` option. When enabled, the SDK will include additional context in fetch error messages to help with debugging.
14+
15+
- **feat(nextjs): Add routeManifestInjection option to exclude routes from client bundle ([#18798](https://github.com/getsentry/sentry-javascript/pull/18798))**
16+
17+
A new `routeManifestInjection` option allows you to exclude sensitive routes from being injected into the client bundle.
18+
19+
- **feat(tanstackstart-react): Add `wrapMiddlewaresWithSentry` for manual middleware instrumentation ([#18680](https://github.com/getsentry/sentry-javascript/pull/18680))**
20+
21+
You can now wrap your middlewares using `wrapMiddlewaresWithSentry`, allowing you to trace middleware execution in your TanStack Start application.
22+
23+
```ts
24+
import { createMiddleware } from '@tanstack/react-start';
25+
import { wrapMiddlewaresWithSentry } from '@sentry/tanstackstart-react';
26+
27+
const loggingMiddleware = createMiddleware({ type: 'function' }).server(async ({ next }) => {
28+
console.log('Request started');
29+
return next();
30+
});
31+
32+
export const [wrappedLoggingMiddleware] = wrapMiddlewaresWithSentry({ loggingMiddleware });
33+
```
34+
35+
### Other Changes
36+
37+
- feat(browser): Add CDN bundle for `tracing.logs.metrics` ([#18784](https://github.com/getsentry/sentry-javascript/pull/18784))
38+
- feat(core,node-core): Consolidate bun and node types with ServerRuntimeOptions ([#18734](https://github.com/getsentry/sentry-javascript/pull/18734))
39+
- feat(nextjs): Remove tracing from generation function template ([#18733](https://github.com/getsentry/sentry-javascript/pull/18733))
40+
- fix(core): Don't record outcomes for failed client reports ([#18808](https://github.com/getsentry/sentry-javascript/pull/18808))
41+
- fix(deno,cloudflare): Prioritize name from params over name from options ([#18800](https://github.com/getsentry/sentry-javascript/pull/18800))
42+
- fix(web-vitals): Add error handling for invalid object keys in `WeakMap` ([#18809](https://github.com/getsentry/sentry-javascript/pull/18809))
43+
44+
<details>
45+
<summary><strong>Internal Changes</strong></summary>
46+
47+
- ref(nextjs): Split `withSentryConfig` ([#18777](https://github.com/getsentry/sentry-javascript/pull/18777))
48+
- test(e2e): Pin @shopify/remix-oxygen to unblock ci ([#18811](https://github.com/getsentry/sentry-javascript/pull/18811))
49+
50+
</details>
51+
752
## 10.33.0
853

954
### Important Changes

dev-packages/browser-integration-tests/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ To filter tests by their title:
7474

7575
You can refer to [Playwright documentation](https://playwright.dev/docs/test-cli) for other CLI options.
7676

77-
You can set env variable `PW_BUNDLE` to set specific build or bundle to test against. Available options: `esm`, `cjs`,
78-
`bundle`, `bundle_min`
77+
You can set env variable `PW_BUNDLE` to set specific build or bundle to test against. Available options include: `esm`, `cjs`,
78+
`bundle`, `bundle_min`, `bundle_tracing`, `bundle_tracing_logs_metrics`, `bundle_replay`, `bundle_tracing_replay_feedback`, and more.
79+
See `package.json` scripts for the full list of `test:bundle:*` commands.
7980

8081
### Troubleshooting
8182

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"test:bundle:replay:min": "PW_BUNDLE=bundle_replay_min yarn test",
2424
"test:bundle:tracing": "PW_BUNDLE=bundle_tracing yarn test",
2525
"test:bundle:tracing:min": "PW_BUNDLE=bundle_tracing_min yarn test",
26+
"test:bundle:tracing_logs_metrics": "PW_BUNDLE=bundle_tracing_logs_metrics yarn test",
27+
"test:bundle:tracing_logs_metrics:min": "PW_BUNDLE=bundle_tracing_logs_metrics_min yarn test",
28+
"test:bundle:tracing_logs_metrics:debug_min": "PW_BUNDLE=bundle_tracing_logs_metrics_debug_min yarn test",
2629
"test:bundle:full": "PW_BUNDLE=bundle_tracing_replay_feedback yarn test",
2730
"test:bundle:full:min": "PW_BUNDLE=bundle_tracing_replay_feedback_min yarn test",
2831
"test:cjs": "PW_BUNDLE=cjs yarn test",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
Sentry.init({
6+
dsn: 'https://[email protected]/1337',
7+
enhanceFetchErrorMessages: false,
8+
});
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Based on possible TypeError exceptions from https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch
2+
3+
// Network error (e.g. ad-blocked, offline, page does not exist, ...)
4+
window.networkError = () => {
5+
fetch('http://sentry-test-external.io/does-not-exist');
6+
};
7+
8+
window.networkErrorSubdomain = () => {
9+
fetch('http://subdomain.sentry-test-external.io/does-not-exist');
10+
};
11+
12+
window.networkErrorWithPort = () => {
13+
fetch('http://sentry-test-external.io:3000/does-not-exist');
14+
};
15+
16+
// Invalid header also produces TypeError
17+
window.invalidHeaderName = () => {
18+
fetch('http://sentry-test-external.io/invalid-header-name', { headers: { 'C ontent-Type': 'text/xml' } });
19+
};
20+
21+
// Invalid header value also produces TypeError
22+
window.invalidHeaderValue = () => {
23+
fetch('http://sentry-test-external.io/invalid-header-value', { headers: ['Content-Type', 'text/html', 'extra'] });
24+
};
25+
26+
// Invalid URL scheme
27+
window.invalidUrlScheme = () => {
28+
fetch('blub://sentry-test-external.io/invalid-scheme');
29+
};
30+
31+
// URL includes credentials
32+
window.credentialsInUrl = () => {
33+
fetch('https://user:[email protected]/credentials-in-url');
34+
};
35+
36+
// Invalid mode
37+
window.invalidMode = () => {
38+
fetch('https://sentry-test-external.io/invalid-mode', { mode: 'navigate' });
39+
};
40+
41+
// Invalid request method
42+
window.invalidMethod = () => {
43+
fetch('http://sentry-test-external.io/invalid-method', { method: 'CONNECT' });
44+
};
45+
46+
// No-cors mode with cors-required method
47+
window.noCorsMethod = () => {
48+
fetch('http://sentry-test-external.io/no-cors-method', { mode: 'no-cors', method: 'PUT' });
49+
};
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import { expect } from '@playwright/test';
2+
import { sentryTest } from '../../../utils/fixtures';
3+
import { envelopeRequestParser, waitForErrorRequest } from '../../../utils/helpers';
4+
5+
sentryTest(
6+
'enhanceFetchErrorMessages: false: enhances error for Sentry while preserving original',
7+
async ({ getLocalTestUrl, page, browserName }) => {
8+
const url = await getLocalTestUrl({ testDir: __dirname });
9+
const reqPromise = waitForErrorRequest(page);
10+
const pageErrorPromise = new Promise<string>(resolve => {
11+
page.on('pageerror', error => {
12+
resolve(error.message);
13+
});
14+
});
15+
16+
await page.goto(url);
17+
await page.evaluate('networkError()');
18+
19+
const [req, pageErrorMessage] = await Promise.all([reqPromise, pageErrorPromise]);
20+
const eventData = envelopeRequestParser(req);
21+
const originalErrorMap: Record<string, string> = {
22+
chromium: 'Failed to fetch',
23+
webkit: 'Load failed',
24+
firefox: 'NetworkError when attempting to fetch resource.',
25+
};
26+
27+
const originalError = originalErrorMap[browserName];
28+
29+
expect(pageErrorMessage).toContain(originalError);
30+
expect(pageErrorMessage).not.toContain('sentry-test-external.io');
31+
32+
expect(eventData.exception?.values).toHaveLength(1);
33+
expect(eventData.exception?.values?.[0]).toMatchObject({
34+
type: 'TypeError',
35+
value: originalError,
36+
mechanism: {
37+
handled: false,
38+
type: 'auto.browser.global_handlers.onunhandledrejection',
39+
},
40+
});
41+
},
42+
);
43+
44+
sentryTest(
45+
'enhanceFetchErrorMessages: false: enhances subdomain errors',
46+
async ({ getLocalTestUrl, page, browserName }) => {
47+
const url = await getLocalTestUrl({ testDir: __dirname });
48+
const reqPromise = waitForErrorRequest(page);
49+
const pageErrorPromise = new Promise<string>(resolve => page.on('pageerror', error => resolve(error.message)));
50+
51+
await page.goto(url);
52+
await page.evaluate('networkErrorSubdomain()');
53+
54+
const [req, pageErrorMessage] = await Promise.all([reqPromise, pageErrorPromise]);
55+
const eventData = envelopeRequestParser(req);
56+
57+
const originalErrorMap: Record<string, string> = {
58+
chromium: 'Failed to fetch',
59+
webkit: 'Load failed',
60+
firefox: 'NetworkError when attempting to fetch resource.',
61+
};
62+
63+
const originalError = originalErrorMap[browserName];
64+
65+
expect(pageErrorMessage).toContain(originalError);
66+
expect(pageErrorMessage).not.toContain('subdomain.sentry-test-external.io');
67+
expect(eventData.exception?.values).toHaveLength(1);
68+
expect(eventData.exception?.values?.[0]).toMatchObject({
69+
type: 'TypeError',
70+
value: originalError,
71+
mechanism: {
72+
handled: false,
73+
type: 'auto.browser.global_handlers.onunhandledrejection',
74+
},
75+
});
76+
},
77+
);
78+
79+
sentryTest(
80+
'enhanceFetchErrorMessages: false: includes port in hostname',
81+
async ({ getLocalTestUrl, page, browserName }) => {
82+
const url = await getLocalTestUrl({ testDir: __dirname });
83+
const reqPromise = waitForErrorRequest(page);
84+
85+
const pageErrorPromise = new Promise<string>(resolve => page.on('pageerror', error => resolve(error.message)));
86+
87+
await page.goto(url);
88+
await page.evaluate('networkErrorWithPort()');
89+
90+
const [req, pageErrorMessage] = await Promise.all([reqPromise, pageErrorPromise]);
91+
const eventData = envelopeRequestParser(req);
92+
93+
const originalErrorMap: Record<string, string> = {
94+
chromium: 'Failed to fetch',
95+
webkit: 'Load failed',
96+
firefox: 'NetworkError when attempting to fetch resource.',
97+
};
98+
99+
const originalError = originalErrorMap[browserName];
100+
101+
expect(pageErrorMessage).toContain(originalError);
102+
expect(pageErrorMessage).not.toContain('sentry-test-external.io:3000');
103+
expect(eventData.exception?.values).toHaveLength(1);
104+
expect(eventData.exception?.values?.[0]).toMatchObject({
105+
type: 'TypeError',
106+
value: originalError,
107+
mechanism: {
108+
handled: false,
109+
type: 'auto.browser.global_handlers.onunhandledrejection',
110+
},
111+
});
112+
},
113+
);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
Sentry.init({
6+
dsn: 'https://[email protected]/1337',
7+
enhanceFetchErrorMessages: 'report-only',
8+
});

0 commit comments

Comments
 (0)