Skip to content

Commit 80e19f2

Browse files
authored
Merge pull request #15791 from getsentry/prepare-release/9.9.0
meta: Update changelog for 9.9.0
2 parents fb4810c + bb358cf commit 80e19f2

File tree

74 files changed

+2356
-269
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

+2356
-269
lines changed

.size-limit.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ module.exports = [
4040
path: 'packages/browser/build/npm/esm/index.js',
4141
import: createImport('init', 'browserTracingIntegration'),
4242
gzip: true,
43-
limit: '37.5 KB',
43+
limit: '38 KB',
4444
},
4545
{
4646
name: '@sentry/browser (incl. Tracing, Replay)',
4747
path: 'packages/browser/build/npm/esm/index.js',
4848
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
4949
gzip: true,
50-
limit: '75.5 KB',
50+
limit: '76 KB',
5151
},
5252
{
5353
name: '@sentry/browser (incl. Tracing, Replay) - with treeshaking flags',

CHANGELOG.md

+60
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,66 @@
1010

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

13+
## 9.9.0
14+
15+
### Important Changes
16+
17+
- **feat(nextjs): Support `instrumentation-client.ts` ([#15705](https://github.com/getsentry/sentry-javascript/pull/15705))**
18+
19+
Next.js recently added a feature to support [client-side (browser) instrumentation via the `experimental.clientInstrumentationHook` flag and the `instrumentation-client.ts` file](https://nextjs.org/docs/app/api-reference/config/next-config-js/clientInstrumentationHook).
20+
21+
To be forwards compatible, the Sentry Next.js SDK will now pick up `instrumentation-client.ts` files even on older Next.js versions and add them to your client bundles.
22+
It is suggested that you either rename your `sentry.client.config.ts` file to `instrumentation-client.ts`, or if you already happen to have a `instrumentation-client.ts` file move the contents of `sentry.client.config.ts` to `instrumentation-client.ts`.
23+
24+
- **feat(browser): Add `previous_trace` span links ([#15569](https://github.com/getsentry/sentry-javascript/pull/15569))**
25+
26+
The `@sentry/browser` SDK and SDKs based on `@sentry/browser` now emits a link from the first root span of a newly started trace to the root span of a previously started trace. You can control this feature via an option in `browserTracingIntegration()`:
27+
28+
```js
29+
Sentry.init({
30+
dsn: 'your-dsn-here'
31+
integrations: [
32+
Sentry.browserTracingIntegration({
33+
// Available settings:
34+
// - 'in-memory' (default): Stores previous trace information in memory
35+
// - 'session-storage': Stores previous trace information in the browser's `sessionStorage`
36+
// - 'off': Disable storing and sending previous trace information
37+
linkPreviousTrace: 'in-memory',
38+
}),
39+
],
40+
});
41+
```
42+
43+
- **feat(browser): Add `logger.X` methods to browser SDK ([#15763](https://github.com/getsentry/sentry-javascript/pull/15763))**
44+
45+
For Sentry's [upcoming logging product](https://github.com/getsentry/sentry/discussions/86804), the SDK now supports sending logs via dedicated
46+
47+
```js
48+
Sentry.init({
49+
dsn: 'your-dsn-here',
50+
_experiments: {
51+
enableLogs: true, // This is required to use the logging features
52+
},
53+
});
54+
55+
Sentry.logger.info('This is a trace message', { userId: 123 });
56+
// See PR for better documentation
57+
```
58+
59+
Please note that the logs product is still in early access. See the link above for more information.
60+
61+
### Other Changes
62+
63+
- feat(browser): Attach host as part of error message to "Failed to fetch" errors ([#15729](https://github.com/getsentry/sentry-javascript/pull/15729))
64+
- feat(core): Add `parseStringToURL` method ([#15768](https://github.com/getsentry/sentry-javascript/pull/15768))
65+
- feat(core): Optimize `dropUndefinedKeys` ([#15760](https://github.com/getsentry/sentry-javascript/pull/15760))
66+
- feat(node): Add fastify `shouldHandleError` ([#15771](https://github.com/getsentry/sentry-javascript/pull/15771))
67+
- fix(nuxt): Delete no longer needed Nitro 'close' hook ([#15790](https://github.com/getsentry/sentry-javascript/pull/15790))
68+
- perf(nestjs): Remove usage of `addNonEnumerableProperty` ([#15766](https://github.com/getsentry/sentry-javascript/pull/15766))
69+
- ref: Avoid some usage of `dropUndefinedKeys()` ([#15757](https://github.com/getsentry/sentry-javascript/pull/15757))
70+
- ref: Remove some usages of `dropUndefinedKeys()` ([#15781](https://github.com/getsentry/sentry-javascript/pull/15781))
71+
- ref(nextjs): Fix Next.js vercel-edge runtime package information ([#15789](https://github.com/getsentry/sentry-javascript/pull/15789))
72+
1373
## 9.8.0
1474

1575
- feat(node): Implement new continuous profiling API spec ([#15635](https://github.com/getsentry/sentry-javascript/pull/15635))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
Sentry.init({
6+
dsn: 'https://[email protected]/1337',
7+
transportOptions: {
8+
fetchOptions: {
9+
// See: https://github.com/microsoft/playwright/issues/34497
10+
keepalive: false,
11+
},
12+
},
13+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
// Invalid header also produces TypeError
13+
window.invalidHeaderName = () => {
14+
fetch('http://sentry-test-external.io/invalid-header-name', { headers: { 'C ontent-Type': 'text/xml' } });
15+
};
16+
17+
// Invalid header value also produces TypeError
18+
window.invalidHeaderValue = () => {
19+
fetch('http://sentry-test-external.io/invalid-header-value', { headers: ['Content-Type', 'text/html', 'extra'] });
20+
};
21+
22+
// Invalid URL scheme
23+
window.invalidUrlScheme = () => {
24+
fetch('blub://sentry-test-external.io/invalid-scheme');
25+
};
26+
27+
// URL includes credentials
28+
window.credentialsInUrl = () => {
29+
fetch('https://user:[email protected]/credentials-in-url');
30+
};
31+
32+
// Invalid mode
33+
window.invalidMode = () => {
34+
fetch('https://sentry-test-external.io/invalid-mode', { mode: 'navigate' });
35+
};
36+
37+
// Invalid request method
38+
window.invalidMethod = () => {
39+
fetch('http://sentry-test-external.io/invalid-method', { method: 'CONNECT' });
40+
};
41+
42+
// No-cors mode with cors-required method
43+
window.noCorsMethod = () => {
44+
fetch('http://sentry-test-external.io/no-cors-method', { mode: 'no-cors', method: 'PUT' });
45+
};

0 commit comments

Comments
 (0)