Skip to content

Commit f3bfe11

Browse files
authored
Merge pull request #7966 from getsentry/prepare-release/7.50.0
meta(changelog): Update Changelog for 7.50.0
2 parents 28ba7bf + da799e9 commit f3bfe11

File tree

136 files changed

+4518
-1393
lines changed

Some content is hidden

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

136 files changed

+4518
-1393
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ jobs:
511511
needs: [job_get_metadata, job_build]
512512
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
513513
runs-on: ubuntu-20.04
514-
timeout-minutes: 15
514+
timeout-minutes: 18
515515
strategy:
516516
fail-fast: false
517517
matrix:
@@ -768,6 +768,9 @@ jobs:
768768
uses: actions/checkout@v3
769769
with:
770770
ref: ${{ env.HEAD_COMMIT }}
771+
- uses: pnpm/action-setup@v2
772+
with:
773+
version: 7
771774
- name: Set up Node
772775
uses: actions/setup-node@v3
773776
with:

.github/workflows/canary.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
uses: actions/checkout@v3
2727
with:
2828
ref: ${{ env.HEAD_COMMIT }}
29+
- uses: pnpm/action-setup@v2
30+
with:
31+
version: 7
2932
- name: Set up Node
3033
uses: actions/setup-node@v3
3134
with:

.github/workflows/gitflow-sync-develop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939
github_token: ${{ secrets.REPO_SCOPED_TOKEN }}
4040

4141
- name: Enable automerge for PR
42-
run: gh pr merge --merge --auto "1"
42+
if: steps.open-pr.outputs.pr_number != ''
43+
run: gh pr merge --merge --auto "${{ steps.open-pr.outputs.pr_number }}"
4344
env:
4445
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4546

4647
# https://github.com/marketplace/actions/auto-approve
4748
- name: Auto approve PR
48-
# Always skip this for now, until we got a proper bot setup
4949
if: steps.open-pr.outputs.pr_number != ''
5050
uses: hmarr/auto-approve-action@v3
5151
with:

.github/workflows/label-last-commenter.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ on:
55
types: [created]
66

77
jobs:
8-
deploy:
8+
toggle_labels:
9+
name: Toggle Labels
910
runs-on: ubuntu-latest
1011
if: ${{ !github.event.issue.pull_request }}
1112
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v3
14-
1513
- name: Add label if commenter is not member
14+
# Note: We only add the label if the issue is still open
1615
if: |
1716
github.event.comment.author_association != 'COLLABORATOR'
1817
&& github.event.comment.author_association != 'MEMBER'
1918
&& github.event.comment.author_association != 'OWNER'
19+
&& github.event.issue.state == 'open'
2020
uses: actions-ecosystem/action-add-labels@v1
2121
with:
2222
labels: 'Waiting for: Team'

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,106 @@
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 (#7976)**
12+
- feat(sveltekit): Convert `sentryHandle` to a factory function (#7975)
13+
14+
With this release, the Sveltekit SDK ([@sentry/sveltekit](./packages/sveltekit/README.md)) is promoted to Beta.
15+
This means that we do not expect any more breaking changes.
16+
17+
The final breaking change is that `sentryHandle` is now a function.
18+
So in order to update to 7.50.0, you have to update your `hooks.server.js` file:
19+
20+
```js
21+
// hooks.server.js
22+
23+
// Old:
24+
export const handle = sentryHandle;
25+
// New:
26+
export const handle = sentryHandle();
27+
```
28+
29+
- **feat(replay): Allow to configure URLs to capture network bodies/headers (#7953)**
30+
31+
You can now capture request/response bodies & headers of network requests in Replay.
32+
You have to define an allowlist of URLs you want to capture additional information for:
33+
34+
```js
35+
new Replay({
36+
networkDetailAllowUrls: ['https://sentry.io/api'],
37+
});
38+
```
39+
40+
By default, we will capture request/response bodies, as well as the request/response headers `content-type`, `content-length` and `accept`.
41+
You can configure this with some additional configuration:
42+
43+
```js
44+
new Replay({
45+
networkDetailAllowUrls: ['https://sentry.io/api'],
46+
// opt-out of capturing bodies
47+
networkCaptureBodies: false,
48+
// These headers are captured _in addition to_ the default headers
49+
networkRequestHeaders: ['X-Custom-Header'],
50+
networkResponseHeaders: ['X-Custom-Header', 'X-Custom-Header-2']
51+
});
52+
```
53+
54+
Note that bodies will be truncated to a max length of ~150k characters.
55+
56+
**- feat(replay): Changes of sampling behavior & public API**
57+
- feat(replay): Change the behavior of error-based sampling (#7768)
58+
- feat(replay): Change `flush()` API to record current event buffer (#7743)
59+
- feat(replay): Change `stop()` to flush and remove current session (#7741)
60+
61+
We have changed the behavior of error-based sampling, as well as adding & adjusting APIs a bit to be more aligned with expectations.
62+
See [Sampling](./packages/replay/README.md#sampling) for details.
63+
64+
We've also revamped some public APIs in order to be better aligned with expectations. See [Stoping & Starting Replays manually](./packages/replay/README.md#stopping--starting-replays-manually) for details.
65+
66+
- **feat(core): Add multiplexed transport (#7926)**
67+
68+
We added a new transport to support multiplexing.
69+
With this, you can configure Sentry to send events to different DSNs, depending on a logic of your choosing:
70+
71+
```js
72+
import { makeMultiplexedTransport } from '@sentry/core';
73+
import { init, captureException, makeFetchTransport } from '@sentry/browser';
74+
75+
function dsnFromFeature({ getEvent }) {
76+
const event = getEvent();
77+
switch(event?.tags?.feature) {
78+
case 'cart':
79+
return ['__CART_DSN__'];
80+
case 'gallery':
81+
return ['__GALLERY_DSN__'];
82+
}
83+
return []
84+
}
85+
86+
init({
87+
dsn: '__FALLBACK_DSN__',
88+
transport: makeMultiplexedTransport(makeFetchTransport, dsnFromFeature)
89+
});
90+
```
91+
92+
### Additional Features and Fixes
93+
94+
- feat(nextjs): Add `disableLogger` option that automatically tree shakes logger statements (#7908)
95+
- feat(node): Make Undici a default integration. (#7967)
96+
- feat(replay): Extend session idle time until expire to 15min (#7955)
97+
- feat(tracing): Add `db.system` span data to DB spans (#7952)
98+
- fix(core): Avoid crash when Function.prototype is frozen (#7899)
99+
- fix(nextjs): Fix inject logic for Next.js 13.3.1 canary (#7921)
100+
- fix(replay): Ensure console breadcrumb args are truncated (#7917)
101+
- fix(replay): Ensure we do not set replayId on dsc if replay is disabled (#7939)
102+
- fix(replay): Ensure we still truncate large bodies if they are failed JSON (#7923)
103+
- fix(utils): default normalize() to a max. of 100 levels deep instead of Inifnity (#7957)
104+
105+
Work in this release contributed by @Jack-Works. Thank you for your contribution!
106+
7107
## 7.49.0
8108
9109
### Important Changes
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
window.Replay = new Sentry.Replay({
5+
flushMinDelay: 1000,
6+
flushMaxDelay: 1000,
7+
});
8+
9+
Sentry.init({
10+
dsn: 'https://[email protected]/1337',
11+
sampleRate: 1,
12+
replaysSessionSampleRate: 0.0,
13+
replaysOnErrorSampleRate: 0.0,
14+
15+
integrations: [window.Replay],
16+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
document.getElementById('go-background').addEventListener('click', () => {
2+
Object.defineProperty(document, 'hidden', { value: true, writable: true });
3+
const ev = document.createEvent('Event');
4+
ev.initEvent('visibilitychange');
5+
document.dispatchEvent(ev);
6+
});
7+
8+
document.getElementById('error').addEventListener('click', () => {
9+
throw new Error('Ooops');
10+
});
11+
12+
document.getElementById('error2').addEventListener('click', () => {
13+
throw new Error('Another error');
14+
});
15+
16+
document.getElementById('log').addEventListener('click', () => {
17+
console.log('Some message');
18+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
</head>
6+
<body>
7+
<button id="go-background">Go to background</button>
8+
<button id="error">Throw Error</button>
9+
<button id="error2">Another Error</button>
10+
<button id="log">Log stuff to the console</button>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)