Skip to content

Commit a0c2a88

Browse files
Luca Forstnerc298lee
authored andcommitted
Merge pull request #9118 from getsentry/prepare-release/7.72.0
2 parents 7614bb9 + 7f1f5d7 commit a0c2a88

File tree

124 files changed

+2828
-703
lines changed

Some content is hidden

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

124 files changed

+2828
-703
lines changed

CHANGELOG.md

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

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

7+
## 7.72.0
8+
9+
### Important Changes
10+
11+
- **feat(node): App Not Responding with stack traces (#9079)**
12+
13+
This release introduces support for Application Not Responding (ANR) errors for Node.js applications.
14+
These errors are triggered when the Node.js main thread event loop of an application is blocked for more than five seconds.
15+
The Node SDK reports ANR errors as Sentry events and can optionally attach a stacktrace of the blocking code to the ANR event.
16+
17+
To enable ANR detection, import and use the `enableANRDetection` function from the `@sentry/node` package before you run the rest of your application code.
18+
Any event loop blocking before calling `enableANRDetection` will not be detected by the SDK.
19+
20+
Example (ESM):
21+
22+
```ts
23+
import * as Sentry from "@sentry/node";
24+
25+
Sentry.init({
26+
dsn: "___PUBLIC_DSN___",
27+
tracesSampleRate: 1.0,
28+
});
29+
30+
await Sentry.enableANRDetection({ captureStackTrace: true });
31+
// Function that runs your app
32+
runApp();
33+
```
34+
35+
Example (CJS):
36+
37+
```ts
38+
const Sentry = require("@sentry/node");
39+
40+
Sentry.init({
41+
dsn: "___PUBLIC_DSN___",
42+
tracesSampleRate: 1.0,
43+
});
44+
45+
Sentry.enableANRDetection({ captureStackTrace: true }).then(() => {
46+
// Function that runs your app
47+
runApp();
48+
});
49+
```
50+
51+
### Other Changes
52+
53+
- fix(nextjs): Filter `RequestAsyncStorage` locations by locations that webpack will resolve (#9114)
54+
- fix(replay): Ensure `replay_id` is not captured when session is expired (#9109)
55+
756
## 7.71.0
857

958
- 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
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"packages/ember",
4949
"packages/eslint-config-sdk",
5050
"packages/eslint-plugin-sdk",
51+
"packages/feedback",
5152
"packages/gatsby",
5253
"packages/hub",
5354
"packages/integrations",

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/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/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);

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ sentryTest(
1515
sentryTest.skip();
1616
}
1717

18-
const reqPromise0 = waitForReplayRequest(page, 0);
19-
2018
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
2119
return route.fulfill({
2220
status: 200,
@@ -25,23 +23,24 @@ sentryTest(
2523
});
2624
});
2725

26+
const reqPromise0 = waitForReplayRequest(page, 0);
27+
2828
const url = await getLocalTestPath({ testDir: __dirname });
2929

30-
await page.goto(url);
31-
const res0 = await reqPromise0;
30+
const [res0] = await Promise.all([reqPromise0, page.goto(url)]);
31+
await forceFlushReplay();
3232

3333
const reqPromise1 = waitForReplayRequest(page);
3434

35-
void page.click('#button-add');
35+
const [res1] = await Promise.all([reqPromise1, page.click('#button-add')]);
3636
await forceFlushReplay();
37-
const res1 = await reqPromise1;
3837

3938
// replay should be stopped due to mutation limit
4039
let replay = await getReplaySnapshot(page);
4140
expect(replay.session).toBe(undefined);
4241
expect(replay._isEnabled).toBe(false);
4342

44-
void page.click('#button-modify');
43+
await page.click('#button-modify');
4544
await forceFlushReplay();
4645

4746
await page.click('#button-remove');

0 commit comments

Comments
 (0)