Skip to content

Commit a5aca99

Browse files
authored
Merge branch 'develop' into feat-feedback-bootstrap-feedback-integration
2 parents a9de525 + aa41f97 commit a5aca99

File tree

128 files changed

+1467
-998
lines changed

Some content is hidden

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

128 files changed

+1467
-998
lines changed

.size-limit.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = [
55
path: 'packages/browser/build/npm/esm/index.js',
66
import: '{ init, Replay, BrowserTracing }',
77
gzip: true,
8-
limit: '80 KB',
8+
limit: '90 KB',
99
},
1010
{
1111
name: '@sentry/browser (incl. Tracing) - Webpack (gzipped)',
@@ -47,7 +47,7 @@ module.exports = [
4747
name: '@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed)',
4848
path: 'packages/browser/build/bundles/bundle.tracing.replay.min.js',
4949
gzip: false,
50-
limit: '250 KB',
50+
limit: '260 KB',
5151
},
5252
{
5353
name: '@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed)',
@@ -77,7 +77,7 @@ module.exports = [
7777
path: 'packages/react/build/esm/index.js',
7878
import: '{ init, BrowserTracing, Replay }',
7979
gzip: true,
80-
limit: '80 KB',
80+
limit: '90 KB',
8181
},
8282
{
8383
name: '@sentry/react - Webpack (gzipped)',
@@ -93,7 +93,7 @@ module.exports = [
9393
path: 'packages/nextjs/build/esm/client/index.js',
9494
import: '{ init, BrowserTracing, Replay }',
9595
gzip: true,
96-
limit: '100 KB',
96+
limit: '110 KB',
9797
},
9898
{
9999
name: '@sentry/nextjs Client - Webpack (gzipped)',

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,78 @@
22

33
## Unreleased
44

5+
### Important Changes
6+
7+
- **feat(replay): Upgrade to rrweb2**
8+
9+
This is fully backwards compatible with prior versions of the Replay SDK. The only breaking change that we will making is to not be masking `aria-label` by default. The reason for this change is to align with our core SDK which also does not mask `aria-label`. This change also enables better support of searching by clicks.
10+
11+
Another change that needs to be highlighted is the 13% bundle size increase. This bundle size increase is necessary to bring improved recording performance and improved replay fidelity, especially in regards to web components and iframes. We will be investigating the reduction of the bundle size in [this PR](https://github.com/getsentry/sentry-javascript/issues/8815).
12+
13+
Here are benchmarks comparing the version 1 of rrweb to version 2
14+
15+
| metric | v1 | v2 |
16+
| --------- | ---------- | ---------- |
17+
| lcp | 1486.06 ms | 1529.11 ms |
18+
| cls | 0.40 ms | 0.40 ms |
19+
| fid | 1.53 ms | 1.50 ms |
20+
| tbt | 3207.22 ms | 3036.80 ms |
21+
| memoryAvg | 131.83 MB | 124.84 MB |
22+
| memoryMax | 324.8 MB | 339.03 MB |
23+
| netTx | 282.67 KB | 272.51 KB |
24+
| netRx | 8.02 MB | 8.07 MB |
25+
526
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
627

28+
## 7.72.0
29+
30+
### Important Changes
31+
32+
- **feat(node): App Not Responding with stack traces (#9079)**
33+
34+
This release introduces support for Application Not Responding (ANR) errors for Node.js applications.
35+
These errors are triggered when the Node.js main thread event loop of an application is blocked for more than five seconds.
36+
The Node SDK reports ANR errors as Sentry events and can optionally attach a stacktrace of the blocking code to the ANR event.
37+
38+
To enable ANR detection, import and use the `enableANRDetection` function from the `@sentry/node` package before you run the rest of your application code.
39+
Any event loop blocking before calling `enableANRDetection` will not be detected by the SDK.
40+
41+
Example (ESM):
42+
43+
```ts
44+
import * as Sentry from "@sentry/node";
45+
46+
Sentry.init({
47+
dsn: "___PUBLIC_DSN___",
48+
tracesSampleRate: 1.0,
49+
});
50+
51+
await Sentry.enableANRDetection({ captureStackTrace: true });
52+
// Function that runs your app
53+
runApp();
54+
```
55+
56+
Example (CJS):
57+
58+
```ts
59+
const Sentry = require("@sentry/node");
60+
61+
Sentry.init({
62+
dsn: "___PUBLIC_DSN___",
63+
tracesSampleRate: 1.0,
64+
});
65+
66+
Sentry.enableANRDetection({ captureStackTrace: true }).then(() => {
67+
// Function that runs your app
68+
runApp();
69+
});
70+
```
71+
72+
### Other Changes
73+
74+
- fix(nextjs): Filter `RequestAsyncStorage` locations by locations that webpack will resolve (#9114)
75+
- fix(replay): Ensure `replay_id` is not captured when session is expired (#9109)
76+
777
## 7.71.0
878

979
- feat(bun): Instrument Bun.serve (#9080)

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "7.71.0",
3+
"version": "7.72.0",
44
"npmClient": "yarn"
55
}

packages/angular-ivy/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular-ivy",
3-
"version": "7.71.0",
3+
"version": "7.72.0",
44
"description": "Official Sentry SDK for Angular with full Ivy Support",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
@@ -21,9 +21,9 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.71.0",
25-
"@sentry/types": "7.71.0",
26-
"@sentry/utils": "7.71.0",
24+
"@sentry/browser": "7.72.0",
25+
"@sentry/types": "7.72.0",
26+
"@sentry/utils": "7.72.0",
2727
"tslib": "^2.4.1"
2828
},
2929
"devDependencies": {

packages/angular/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular",
3-
"version": "7.71.0",
3+
"version": "7.72.0",
44
"description": "Official Sentry SDK for Angular",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
@@ -21,9 +21,9 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.71.0",
25-
"@sentry/types": "7.71.0",
26-
"@sentry/utils": "7.71.0",
24+
"@sentry/browser": "7.72.0",
25+
"@sentry/types": "7.72.0",
26+
"@sentry/utils": "7.72.0",
2727
"tslib": "^2.4.1"
2828
},
2929
"devDependencies": {

packages/browser-integration-tests/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/browser-integration-tests",
3-
"version": "7.71.0",
3+
"version": "7.72.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {

packages/browser-integration-tests/suites/replay/bufferMode/test.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ sentryTest(
8484
await reqErrorPromise;
8585
expect(callsToSentry).toEqual(2);
8686

87-
await page.evaluate(async () => {
88-
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
89-
await replayIntegration.flush();
90-
});
91-
92-
const req0 = await reqPromise0;
87+
const [req0] = await Promise.all([
88+
reqPromise0,
89+
page.evaluate(async () => {
90+
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
91+
await replayIntegration.flush();
92+
}),
93+
]);
9394

9495
// 2 errors, 1 flush
9596
await reqErrorPromise;
@@ -226,12 +227,13 @@ sentryTest(
226227
await reqErrorPromise;
227228
expect(callsToSentry).toEqual(2);
228229

229-
await page.evaluate(async () => {
230-
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
231-
await replayIntegration.flush({ continueRecording: false });
232-
});
233-
234-
const req0 = await reqPromise0;
230+
const [req0] = await Promise.all([
231+
reqPromise0,
232+
page.evaluate(async () => {
233+
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
234+
await replayIntegration.flush({ continueRecording: false });
235+
}),
236+
]);
235237

236238
// 2 errors, 1 flush
237239
await reqErrorPromise;
@@ -346,9 +348,12 @@ sentryTest(
346348

347349
// Error sample rate is now at 1.0, this error should create a replay
348350
const reqErrorPromise1 = waitForErrorRequest(page);
349-
await page.click('#error2');
350-
// 1 unsampled error, 1 sampled error -> 1 flush
351-
const req0 = await reqPromise0;
351+
const [req0] = await Promise.all([
352+
// 1 unsampled error, 1 sampled error -> 1 flush
353+
reqPromise0,
354+
page.click('#error2'),
355+
]);
356+
352357
const reqError1 = await reqErrorPromise1;
353358
const errorEvent1 = envelopeRequestParser(reqError1);
354359
expect(callsToSentry).toEqual(3);

packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ sentryTest('should capture console messages in replay', async ({ getLocalTestPat
1010
sentryTest.skip();
1111
}
1212

13-
const reqPromise0 = waitForReplayRequest(page, 0);
14-
1513
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
1614
return route.fulfill({
1715
status: 200,
@@ -20,10 +18,11 @@ sentryTest('should capture console messages in replay', async ({ getLocalTestPat
2018
});
2119
});
2220

21+
const reqPromise0 = waitForReplayRequest(page, 0);
22+
2323
const url = await getLocalTestPath({ testDir: __dirname });
2424

25-
await page.goto(url);
26-
await reqPromise0;
25+
await Promise.all([page.goto(url), reqPromise0]);
2726

2827
const reqPromise1 = waitForReplayRequest(
2928
page,
@@ -38,11 +37,10 @@ sentryTest('should capture console messages in replay', async ({ getLocalTestPat
3837
await page.click('[data-log]');
3938

4039
// Sometimes this doesn't seem to trigger, so we trigger it twice to be sure...
41-
await page.click('[data-log]');
42-
40+
const [req1] = await Promise.all([reqPromise1, page.click('[data-log]')]);
4341
await forceFlushReplay();
4442

45-
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
43+
const { breadcrumbs } = getCustomRecordingEvents(req1);
4644

4745
expect(breadcrumbs.filter(breadcrumb => breadcrumb.category === 'console')).toEqual(
4846
expect.arrayContaining([
@@ -65,8 +63,6 @@ sentryTest('should capture very large console logs', async ({ getLocalTestPath,
6563
sentryTest.skip();
6664
}
6765

68-
const reqPromise0 = waitForReplayRequest(page, 0);
69-
7066
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
7167
return route.fulfill({
7268
status: 200,
@@ -75,10 +71,11 @@ sentryTest('should capture very large console logs', async ({ getLocalTestPath,
7571
});
7672
});
7773

74+
const reqPromise0 = waitForReplayRequest(page, 0);
75+
7876
const url = await getLocalTestPath({ testDir: __dirname });
7977

80-
await page.goto(url);
81-
await reqPromise0;
78+
await Promise.all([page.goto(url), reqPromise0]);
8279

8380
const reqPromise1 = waitForReplayRequest(
8481
page,
@@ -90,14 +87,10 @@ sentryTest('should capture very large console logs', async ({ getLocalTestPath,
9087
5_000,
9188
);
9289

93-
await page.click('[data-log-large]');
94-
95-
// Sometimes this doesn't seem to trigger, so we trigger it twice to be sure...
96-
await page.click('[data-log-large]');
97-
90+
const [req1] = await Promise.all([reqPromise1, page.click('[data-log-large]')]);
9891
await forceFlushReplay();
9992

100-
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
93+
const { breadcrumbs } = getCustomRecordingEvents(req1);
10194

10295
expect(breadcrumbs.filter(breadcrumb => breadcrumb.category === 'console')).toEqual(
10396
expect.arrayContaining([

packages/browser-integration-tests/suites/replay/customEvents/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ sentryTest(
117117
nodeId: expect.any(Number),
118118
node: {
119119
attributes: {
120-
'aria-label': '** ***** ** **********',
120+
'aria-label': 'An Error in aria-label',
121121
class: 'btn btn-error',
122122
id: 'error',
123123
role: 'button',

packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,25 @@ sentryTest(
5050

5151
const url = await getLocalTestPath({ testDir: __dirname });
5252

53-
await page.goto(url);
54-
await page.click('#go-background');
55-
await new Promise(resolve => setTimeout(resolve, 1000));
53+
await Promise.all([
54+
page.goto(url),
55+
page.click('#go-background'),
56+
new Promise(resolve => setTimeout(resolve, 1000)),
57+
]);
5658

5759
expect(callsToSentry).toEqual(0);
5860

59-
await page.click('#error');
60-
const req0 = await reqPromise0;
61+
const [req0] = await Promise.all([reqPromise0, page.click('#error')]);
6162

6263
expect(callsToSentry).toEqual(2); // 1 error, 1 replay event
6364

64-
await page.click('#go-background');
65-
const req1 = await reqPromise1;
66-
await reqErrorPromise;
65+
const [req1] = await Promise.all([reqPromise1, page.click('#go-background'), reqErrorPromise]);
6766

6867
expect(callsToSentry).toEqual(3); // 1 error, 2 replay events
6968

7069
await page.click('#log');
71-
await page.click('#go-background');
72-
const req2 = await reqPromise2;
70+
71+
const [req2] = await Promise.all([reqPromise2, page.click('#go-background')]);
7372

7473
const event0 = getReplayEvent(req0);
7574
const content0 = getReplayRecordingContent(req0);

packages/browser-integration-tests/suites/replay/fileInput/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@playwright/test';
2+
import type { inputData } from '@sentry-internal/rrweb';
23
import { IncrementalSource } from '@sentry-internal/rrweb';
3-
import type { inputData } from '@sentry-internal/rrweb/typings/types';
44

55
import { sentryTest } from '../../../utils/fixtures';
66
import type { IncrementalRecordingSnapshot } from '../../../utils/replayHelpers';

packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ sentryTest(
1010
sentryTest.skip();
1111
}
1212

13-
const reqPromise0 = waitForReplayRequest(page, 0);
14-
1513
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
1614
return route.fulfill({
1715
status: 200,
@@ -22,26 +20,17 @@ sentryTest(
2220

2321
const url = await getLocalTestPath({ testDir: __dirname });
2422

25-
await page.goto(url);
26-
const res0 = await reqPromise0;
27-
28-
const reqPromise1 = waitForReplayRequest(page);
29-
30-
void page.click('#button-add');
23+
const [res0] = await Promise.all([waitForReplayRequest(page, 0), page.goto(url)]);
3124
await forceFlushReplay();
32-
const res1 = await reqPromise1;
3325

34-
const reqPromise2 = waitForReplayRequest(page);
35-
36-
void page.click('#button-modify');
26+
const [res1] = await Promise.all([waitForReplayRequest(page), page.click('#button-add')]);
3727
await forceFlushReplay();
38-
const res2 = await reqPromise2;
3928

40-
const reqPromise3 = waitForReplayRequest(page);
29+
const [res2] = await Promise.all([waitForReplayRequest(page), page.click('#button-modify')]);
30+
await forceFlushReplay();
4131

42-
void page.click('#button-remove');
32+
const [res3] = await Promise.all([waitForReplayRequest(page), page.click('#button-remove')]);
4333
await forceFlushReplay();
44-
const res3 = await reqPromise3;
4534

4635
const replayData0 = getReplayRecordingContent(res0);
4736
const replayData1 = getReplayRecordingContent(res1);

0 commit comments

Comments
 (0)