Skip to content

Commit 9ff9e3f

Browse files
authored
Merge pull request #8602 from getsentry/prepare-release/7.60.0
meta(changelog): Update changelog for 7.60.0
2 parents 13c3a02 + 6aa95c7 commit 9ff9e3f

File tree

94 files changed

+587
-163
lines changed

Some content is hidden

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

94 files changed

+587
-163
lines changed

CHANGELOG.md

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

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

7+
## 7.60.0
8+
9+
### Important Changes
10+
11+
- **feat(replay): Ensure min/max duration when flushing (#8596)**
12+
13+
We will not send replays that are <5s long anymore. Additionally, we also added further safeguards to avoid overly long (>1h) replays.
14+
You can optionally configure the min. replay duration (defaults to 5s):
15+
16+
```js
17+
new Replay({
18+
minReplayDuration: 10000 // in ms - note that this is capped at 15s max!
19+
})
20+
```
21+
22+
### Other Changes
23+
24+
- fix(profiling): Align to SDK selected time origin (#8599)
25+
- fix(replay): Ensure multi click has correct timestamps (#8591)
26+
- fix(utils): Truncate aggregate exception values (LinkedErrors) (#8593)
27+
728
## 7.59.3
829

930
- fix(browser): 0 is a valid index (#8581)
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('captureException works', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311

1412
expect(eventData.message).toBe('Test exception');
1513
});
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('error handler works with a recursive custom error handler', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311
expect(eventData.exception?.values?.length).toBe(1);
1412
expect(eventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');
1513
});
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser,waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('error handler works', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311
expect(eventData.exception?.values?.length).toBe(1);
1412
expect(eventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');
1513
});

packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser,waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('error handler works for later errors', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311

1412
expect(eventData.exception?.values?.length).toBe(1);
1513
expect(eventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');

packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser,shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
4+
import {
5+
envelopeRequestParser,
6+
shouldSkipTracingTest,
7+
waitForTransactionRequestOnUrl,
8+
} from '../../../../utils/helpers';
59

610
sentryTest('should create a pageload transaction', async ({ getLocalTestUrl, page }) => {
711
if (shouldSkipTracingTest()) {
812
sentryTest.skip();
913
}
1014

11-
const req = waitForTransactionRequest(page);
12-
1315
const url = await getLocalTestUrl({ testDir: __dirname });
14-
await page.goto(url);
16+
const req = await waitForTransactionRequestOnUrl(page, url);
1517

16-
const eventData = envelopeRequestParser(await req);
18+
const eventData = envelopeRequestParser(req);
1719
const timeOrigin = await page.evaluate<number>('window._testBaseTimestamp');
1820

1921
const { start_timestamp: startTimestamp } = eventData;

packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from 'path';
44

55
import { sentryTest, TEST_HOST } from '../../../../utils/fixtures';
66
import { LOADER_CONFIGS } from '../../../../utils/generatePlugin';
7-
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';
7+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
88

99
const bundle = process.env.PW_BUNDLE || '';
1010
const isLazy = LOADER_CONFIGS[bundle]?.lazy;
@@ -40,13 +40,10 @@ sentryTest('it does not download the SDK if the SDK was loaded in the meanwhile'
4040
return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
4141
});
4242

43-
const req = waitForErrorRequest(page);
44-
4543
const url = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });
44+
const req = await waitForErrorRequestOnUrl(page, url);
4645

47-
await page.goto(url);
48-
49-
const eventData = envelopeRequestParser(await req);
46+
const eventData = envelopeRequestParser(req);
5047

5148
await waitForFunction(() => cdnLoadedCount === 2);
5249

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('captureException works', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311

1412
expect(eventData.message).toBe('Test exception');
1513
});
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('captureException works inside of onLoad', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311

1412
expect(eventData.message).toBe('Test exception');
1513
});

packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
4+
import {
5+
envelopeRequestParser,
6+
shouldSkipTracingTest,
7+
waitForTransactionRequestOnUrl,
8+
} from '../../../../utils/helpers';
59

610
sentryTest('should handle custom added BrowserTracing integration', async ({ getLocalTestUrl, page }) => {
711
if (shouldSkipTracingTest()) {
812
sentryTest.skip();
913
}
1014

11-
const req = waitForTransactionRequest(page);
12-
1315
const url = await getLocalTestUrl({ testDir: __dirname });
14-
await page.goto(url);
16+
const req = await waitForTransactionRequestOnUrl(page, url);
1517

16-
const eventData = envelopeRequestParser(await req);
18+
const eventData = envelopeRequestParser(req);
1719
const timeOrigin = await page.evaluate<number>('window._testBaseTimestamp');
1820

1921
const { start_timestamp: startTimestamp } = eventData;

packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('error handler works', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311

1412
expect(eventData.exception?.values?.length).toBe(1);
1513
expect(eventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');

packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser,waitForErrorRequest } from '../../../../utils/helpers';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

66
sentryTest('error handler works for later errors', async ({ getLocalTestUrl, page }) => {
7-
const req = waitForErrorRequest(page);
8-
97
const url = await getLocalTestUrl({ testDir: __dirname });
10-
await page.goto(url);
8+
const req = await waitForErrorRequestOnUrl(page, url);
119

12-
const eventData = envelopeRequestParser(await req);
10+
const eventData = envelopeRequestParser(req);
1311

1412
expect(eventData.exception?.values?.length).toBe(1);
1513
expect(eventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');

packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../../utils/fixtures';
4-
import { envelopeRequestParser,shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
4+
import {
5+
envelopeRequestParser,
6+
shouldSkipTracingTest,
7+
waitForTransactionRequestOnUrl,
8+
} from '../../../../utils/helpers';
59

610
sentryTest('should create a pageload transaction', async ({ getLocalTestUrl, page }) => {
711
if (shouldSkipTracingTest()) {
812
sentryTest.skip();
913
}
1014

11-
const req = waitForTransactionRequest(page);
12-
1315
const url = await getLocalTestUrl({ testDir: __dirname });
14-
await page.goto(url);
16+
const req = await waitForTransactionRequestOnUrl(page, url);
1517

16-
const eventData = envelopeRequestParser(await req);
18+
const eventData = envelopeRequestParser(req);
1719
const timeOrigin = await page.evaluate<number>('window._testBaseTimestamp');
1820

1921
const { start_timestamp: startTimestamp } = eventData;

packages/browser-integration-tests/scripts/detectFlakyTests.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import * as path from 'path';
33
import * as childProcess from 'child_process';
44
import { promisify } from 'util';
55

6-
const exec = promisify(childProcess.exec);
7-
86
async function run(): Promise<void> {
97
let testPaths: string[] = [];
108

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const wat = new Error(`This is a very long message that should be truncated and will be,
2+
this is a very long message that should be truncated and will be,
3+
this is a very long message that should be truncated and will be,
4+
this is a very long message that should be truncated and will be,
5+
this is a very long message that should be truncated and will be`);
6+
7+
wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
8+
this is a very long message that should be truncated and hopefully will be,
9+
this is a very long message that should be truncated and hopefully will be,
10+
this is a very long message that should be truncated and hopefully will be,
11+
this is a very long message that should be truncated and hopefully will be,`);
12+
13+
Sentry.captureException(wat);
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { expect } from '@playwright/test';
2+
import type { Event } from '@sentry/types';
3+
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
6+
7+
sentryTest('should capture a linked error with messages', async ({ getLocalTestPath, page }) => {
8+
const url = await getLocalTestPath({ testDir: __dirname });
9+
10+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
11+
12+
expect(eventData.exception?.values).toHaveLength(2);
13+
expect(eventData.exception?.values?.[0]).toMatchObject({
14+
type: 'Error',
15+
value: `This is a very long message that should be truncated and hopefully will be,
16+
this is a very long message that should be truncated and hopefully will be,
17+
this is a very long message that should be truncated and hopefully will be,
18+
this is a very long me...`,
19+
mechanism: {
20+
type: 'chained',
21+
handled: true,
22+
},
23+
stacktrace: {
24+
frames: expect.any(Array),
25+
},
26+
});
27+
expect(eventData.exception?.values?.[1]).toMatchObject({
28+
type: 'Error',
29+
value: `This is a very long message that should be truncated and will be,
30+
this is a very long message that should be truncated and will be,
31+
this is a very long message that should be truncated and will be,
32+
this is a very long message that should be truncated...`,
33+
mechanism: {
34+
type: 'generic',
35+
handled: true,
36+
},
37+
stacktrace: {
38+
frames: expect.any(Array),
39+
},
40+
});
41+
});

packages/browser-integration-tests/suites/replay/bufferMode/init.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import * as Sentry from '@sentry/browser';
22

33
window.Sentry = Sentry;
44
window.Replay = new Sentry.Replay({
5-
flushMinDelay: 1000,
6-
flushMaxDelay: 1000,
5+
flushMinDelay: 200,
6+
flushMaxDelay: 200,
7+
minReplayDuration: 0,
78
});
89

910
Sentry.init({

packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ window.Sentry = Sentry;
55
window.Replay = new Replay({
66
flushMinDelay: 200,
77
flushMaxDelay: 200,
8+
minReplayDuration: 0,
89
});
910

1011
Sentry.init({

packages/browser-integration-tests/suites/replay/compression/init.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import * as Sentry from '@sentry/browser';
22

33
window.Sentry = Sentry;
44
window.Replay = new Sentry.Replay({
5-
flushMinDelay: 500,
6-
flushMaxDelay: 500,
5+
flushMinDelay: 200,
6+
flushMaxDelay: 200,
7+
minReplayDuration: 0,
78
useCompression: true,
89
});
910

packages/browser-integration-tests/suites/replay/customEvents/init.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import * as Sentry from '@sentry/browser';
22

33
window.Sentry = Sentry;
44
window.Replay = new Sentry.Replay({
5-
flushMinDelay: 500,
6-
flushMaxDelay: 500,
5+
flushMinDelay: 200,
6+
flushMaxDelay: 200,
7+
minReplayDuration: 0,
78
useCompression: false,
89
blockAllMedia: false,
910
});

0 commit comments

Comments
 (0)