Skip to content

Commit 0edcda3

Browse files
committed
meta(changelog): Update Changelog for 7.50.0
1 parent a5b9284 commit 0edcda3

File tree

1 file changed

+121
-0
lines changed

1 file changed

+121
-0
lines changed

CHANGELOG.md

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

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

7+
## 7.50.0
8+
9+
### Important Changes
10+
11+
- **doc(sveltekit): Promote the SDK to beta state (#7874)**
12+
13+
The SvelteKit SDK (@sentry/sveltekit) is now officially in Beta.
14+
This means that we do not expect any breaking changes anymore.
15+
16+
- **feat(replay): Allow to configure URLs to capture network bodies/headers (#7953)**
17+
18+
You can now capture request/response bodies & headers of network requests in Replay.
19+
You have to define an allowlist of URLs you want to capture additional information for:
20+
21+
```js
22+
new Replay({
23+
networkDetailAllowUrls: ['https://sentry.io/api'],
24+
});
25+
```
26+
27+
By default, we will capture request/response bodies, as well as the request/response headers `content-type`, `content-length` and `accept`.
28+
You can configure this with some additional configuration:
29+
30+
```js
31+
new Replay({
32+
networkDetailAllowUrls: ['https://sentry.io/api'],
33+
// opt-out of capturing bodies
34+
networkCaptureBodies: false,
35+
// These headers are captured _in addition to_ the default headers
36+
networkRequestHeaders: ['X-Custom-Header'],
37+
networkResponseHeaders: ['X-Custom-Header', 'X-Custom-Header-2']
38+
});
39+
```
40+
41+
Note that bodies will be truncated to a max length of ~150k characters.
42+
43+
**- feat(replay): Extend session idle time until expire to 15min (#7955)**
44+
45+
Replay Sessions will now only be refreshed when a user is idle for 15min or more.
46+
Previously, we would consider 5min of idle time as the threshold for this, which sometimes resulted in a lot of consequitive sessions.
47+
48+
**- feat(replay): Change the behavior of error-based sampling (#7768)**
49+
50+
We have changed the behavior of error-based sampling, as well as adding & adjusting APIs a bit to be more aligned with expectations.
51+
52+
First, the `replaysOnErrorSampleRate` will now be applied per-error at error-time, not in advance at session creation time -
53+
so the sampling rate was not accurate if you had sessions with many errors.
54+
Now whenever an error happens, we'll check the error sample rate, and potentially flush the session.
55+
56+
Related to this, we also reworked the public `start()` method and added a new `startBuffering()` method.
57+
58+
When calling `start()`, it will now _always_ start a session-based Replay, ignoring sample rates.
59+
Note that it will throw an error if a session is already running.
60+
61+
You can use the new `startBuffering()` method to start a new Replay in buffering-mode.
62+
This will either wait for an error (when `replaysOnErrorSampleRate > 0`), or until you manually call `replay.flush()`.
63+
64+
Note that with this change, as soon as either `replaysSessionSampleRate` or `replaysOnErrorSampleRate` are `> 0`,
65+
we will _always_ start recording in the background, either in session mode or in buffering mode.
66+
When both sample rates are set to `0`, you can manually start the session with either `replay.start()` or `replay.startBuffering()`.
67+
68+
69+
**- Improved Replay `flush()` & `stop()` APIs**
70+
- feat(replay): Change `flush()` API to record current event buffer (#7743)
71+
- feat(replay): Change `stop()` to flush and remove current session (#7741)
72+
73+
We have revamped some existing public API of Replay in order to be better aligned with expectations.
74+
75+
`replay.flush()` now works differently when in error sampling mode:
76+
It will send the buffered replay data, then convert the session to a "regular" session and continue recording.
77+
With this, you can manually start capturing at any point.
78+
79+
`replay.stop()` will now flush the event buffer before stopping, and remove the session from session storage.
80+
This also means that `stop()` now returns a promise.
81+
82+
- **feat(core): Add multiplexed transport (#7926)**
83+
84+
We added a new transport to support multiplexing.
85+
With this, you can configure Sentry to send events to different DSNs, depending of a logic of your choosing:
86+
87+
```js
88+
import { makeMultiplexedTransport } from '@sentry/core';
89+
import { init, captureException, makeFetchTransport } from '@sentry/browser';
90+
91+
function dsnFromFeature({ getEvent }) {
92+
const event = getEvent();
93+
switch(event?.tags?.feature) {
94+
case 'cart':
95+
return ['__CART_DSN__'];
96+
case 'gallery':
97+
return ['__GALLERY_DSN__'];
98+
}
99+
return []
100+
}
101+
102+
init({
103+
dsn: '__FALLBACK_DSN__',
104+
transport: makeMultiplexedTransport(makeFetchTransport, dsnFromFeature)
105+
});
106+
```
107+
108+
- **fix(core): fix(utils): default normalize() to a max. of 100 levels deep instead of Inifnity (#7957)**
109+
110+
We used to default to normalize objects to a depth of `Infinity`.
111+
For most cases, this shouldn't matter, because objects aren't actually infinitely deep, and we handle circular dependencies reasonably well.
112+
However, we found out that there _are_ cases where we can still end up running into an infinitely deep recursion -
113+
for example, when using dynamicly generated proxies, which we cannot detect as "same instance", thus our circular dependency handling breaks down.
114+
115+
In order to account for these cases, we now default `normalize()` to a max. depth of 100.
116+
This should avoid this crashing when, for whatever reason, circular dependencies are not properly detected.
117+
118+
### Additional Features and Fixes
119+
120+
- feat(nextjs): Add `disableLogger` option that automatically tree shakes logger statements (#7908)
121+
- feat(tracing): Add `db.system` span data to DB spans (#7952)
122+
- fix(core): Avoid crash when Function.prototype is frozen (#7899)
123+
- fix(nextjs): Fix inject logic for Next.js 13.3.1 canary (#7921)
124+
- fix(replay): Ensure console breadcrumb args are truncated (#7917)
125+
- fix(replay): Ensure we do not set replayId on dsc if replay is disabled (#7939)
126+
- fix(replay): Ensure we still truncate large bodies if they are failed JSON (#7923)
127+
7128
## 7.49.0
8129
9130
### Important Changes

0 commit comments

Comments
 (0)