Skip to content

Commit f675847

Browse files
Merge branch 'develop' into priscila/feat/add-remix-e2e-test
2 parents c15542b + a4c858f commit f675847

File tree

67 files changed

+1509
-406
lines changed

Some content is hidden

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

67 files changed

+1509
-406
lines changed

CHANGELOG.md

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

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

7+
## 7.55.2
8+
9+
- fix(replay): Stop exporting `EventType` from `@sentry-internal/rrweb` (#8334)
10+
- fix(serverless): Export captureCheckIn (#8333)
11+
12+
## 7.55.1
13+
14+
- fix(replay): Do not export types from `@sentry-internal/rrweb` (#8329)
15+
16+
## 7.55.0
17+
18+
- feat(replay): Capture slow clicks (GA) (#8298)
19+
- feat(replay): Improve types for replay recording events (#8224)
20+
- fix(nextjs): Strip query params from transaction names of navigations to unknown routes (#8278)
21+
- fix(replay): Ignore max session life for buffered sessions (#8258)
22+
- fix(sveltekit): Export captureCheckIn (#8313)
23+
- ref(svelte): Add Svelte 4 as a peer dependency (#8280)
24+
725
## 7.54.0
826

927
### Important Changes

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "7.54.0",
3+
"version": "7.55.2",
44
"npmClient": "yarn",
55
"useWorkspaces": true
66
}

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.54.0",
3+
"version": "7.55.2",
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.54.0",
25-
"@sentry/types": "7.54.0",
26-
"@sentry/utils": "7.54.0",
24+
"@sentry/browser": "7.55.2",
25+
"@sentry/types": "7.55.2",
26+
"@sentry/utils": "7.55.2",
2727
"tslib": "^2.3.0"
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.54.0",
3+
"version": "7.55.2",
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.54.0",
25-
"@sentry/types": "7.54.0",
26-
"@sentry/utils": "7.54.0",
24+
"@sentry/browser": "7.55.2",
25+
"@sentry/types": "7.55.2",
26+
"@sentry/utils": "7.55.2",
2727
"tslib": "^2.0.0"
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.54.0",
3+
"version": "7.55.2",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {

packages/browser-integration-tests/suites/replay/slowClick/clickTargets/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ import { getCustomRecordingEvents, shouldSkipReplayTest, waitForReplayRequest }
6565
expect(slowClickBreadcrumbs).toEqual([
6666
{
6767
category: 'ui.slowClickDetected',
68+
type: 'default',
6869
data: {
6970
endReason: 'timeout',
71+
clickCount: 1,
7072
node: {
7173
attributes: expect.objectContaining({
7274
id,
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { getCustomRecordingEvents, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
5+
6+
sentryTest('captures multi click when not detecting slow click', async ({ getLocalTestUrl, page }) => {
7+
if (shouldSkipReplayTest()) {
8+
sentryTest.skip();
9+
}
10+
11+
const reqPromise0 = waitForReplayRequest(page, 0);
12+
13+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
14+
return route.fulfill({
15+
status: 200,
16+
contentType: 'application/json',
17+
body: JSON.stringify({ id: 'test-id' }),
18+
});
19+
});
20+
21+
const url = await getLocalTestUrl({ testDir: __dirname });
22+
23+
await page.goto(url);
24+
await reqPromise0;
25+
26+
const reqPromise1 = waitForReplayRequest(page, (event, res) => {
27+
const { breadcrumbs } = getCustomRecordingEvents(res);
28+
29+
return breadcrumbs.some(breadcrumb => breadcrumb.category === 'ui.multiClick');
30+
});
31+
32+
await page.click('#mutationButtonImmediately', { clickCount: 4 });
33+
34+
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
35+
36+
const slowClickBreadcrumbs = breadcrumbs.filter(breadcrumb => breadcrumb.category === 'ui.multiClick');
37+
38+
expect(slowClickBreadcrumbs).toEqual([
39+
{
40+
category: 'ui.multiClick',
41+
type: 'default',
42+
data: {
43+
clickCount: 4,
44+
metric: true,
45+
node: {
46+
attributes: {
47+
id: 'mutationButtonImmediately',
48+
},
49+
id: expect.any(Number),
50+
tagName: 'button',
51+
textContent: '******* ******** ***********',
52+
},
53+
nodeId: expect.any(Number),
54+
url: 'http://sentry-test.io/index.html',
55+
},
56+
message: 'body > button#mutationButtonImmediately',
57+
timestamp: expect.any(Number),
58+
},
59+
]);
60+
});

packages/browser-integration-tests/suites/replay/slowClick/mutation/test.ts

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ sentryTest('mutation after threshold results in slow click', async ({ getLocalTe
2929
return breadcrumbs.some(breadcrumb => breadcrumb.category === 'ui.slowClickDetected');
3030
});
3131

32-
// Trigger this twice, sometimes this was flaky otherwise...
33-
await page.click('#mutationButton');
3432
await page.click('#mutationButton');
3533

3634
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
@@ -40,8 +38,71 @@ sentryTest('mutation after threshold results in slow click', async ({ getLocalTe
4038
expect(slowClickBreadcrumbs).toEqual([
4139
{
4240
category: 'ui.slowClickDetected',
41+
type: 'default',
42+
data: {
43+
endReason: 'mutation',
44+
clickCount: 1,
45+
node: {
46+
attributes: {
47+
id: 'mutationButton',
48+
},
49+
id: expect.any(Number),
50+
tagName: 'button',
51+
textContent: '******* ********',
52+
},
53+
nodeId: expect.any(Number),
54+
timeAfterClickMs: expect.any(Number),
55+
url: 'http://sentry-test.io/index.html',
56+
},
57+
message: 'body > button#mutationButton',
58+
timestamp: expect.any(Number),
59+
},
60+
]);
61+
62+
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeGreaterThan(3000);
63+
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeLessThan(3100);
64+
});
65+
66+
sentryTest('multiple clicks are counted', async ({ getLocalTestUrl, page }) => {
67+
if (shouldSkipReplayTest()) {
68+
sentryTest.skip();
69+
}
70+
71+
const reqPromise0 = waitForReplayRequest(page, 0);
72+
73+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
74+
return route.fulfill({
75+
status: 200,
76+
contentType: 'application/json',
77+
body: JSON.stringify({ id: 'test-id' }),
78+
});
79+
});
80+
81+
const url = await getLocalTestUrl({ testDir: __dirname });
82+
83+
await page.goto(url);
84+
await reqPromise0;
85+
86+
const reqPromise1 = waitForReplayRequest(page, (event, res) => {
87+
const { breadcrumbs } = getCustomRecordingEvents(res);
88+
89+
return breadcrumbs.some(breadcrumb => breadcrumb.category === 'ui.slowClickDetected');
90+
});
91+
92+
void page.click('#mutationButton', { clickCount: 4 });
93+
94+
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
95+
96+
const slowClickBreadcrumbs = breadcrumbs.filter(breadcrumb => breadcrumb.category === 'ui.slowClickDetected');
97+
const multiClickBreadcrumbs = breadcrumbs.filter(breadcrumb => breadcrumb.category === 'ui.multiClick');
98+
99+
expect(slowClickBreadcrumbs).toEqual([
100+
{
101+
category: 'ui.slowClickDetected',
102+
type: 'default',
43103
data: {
44104
endReason: 'mutation',
105+
clickCount: 4,
45106
node: {
46107
attributes: {
47108
id: 'mutationButton',
@@ -58,6 +119,7 @@ sentryTest('mutation after threshold results in slow click', async ({ getLocalTe
58119
timestamp: expect.any(Number),
59120
},
60121
]);
122+
expect(multiClickBreadcrumbs.length).toEqual(0);
61123

62124
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeGreaterThan(3000);
63125
expect(slowClickBreadcrumbs[0]?.data?.timeAfterClickMs).toBeLessThan(3100);
@@ -165,3 +227,55 @@ sentryTest('inline click handler does not trigger slow click', async ({ getLocal
165227
},
166228
]);
167229
});
230+
231+
sentryTest('mouseDown events are considered', async ({ browserName, getLocalTestUrl, page }) => {
232+
// This test seems to only be flakey on firefox
233+
if (shouldSkipReplayTest() || ['firefox'].includes(browserName)) {
234+
sentryTest.skip();
235+
}
236+
237+
const reqPromise0 = waitForReplayRequest(page, 0);
238+
239+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
240+
return route.fulfill({
241+
status: 200,
242+
contentType: 'application/json',
243+
body: JSON.stringify({ id: 'test-id' }),
244+
});
245+
});
246+
247+
const url = await getLocalTestUrl({ testDir: __dirname });
248+
249+
await page.goto(url);
250+
await reqPromise0;
251+
252+
const reqPromise1 = waitForReplayRequest(page, (event, res) => {
253+
const { breadcrumbs } = getCustomRecordingEvents(res);
254+
255+
return breadcrumbs.some(breadcrumb => breadcrumb.category === 'ui.click');
256+
});
257+
258+
await page.click('#mouseDownButton');
259+
260+
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
261+
262+
expect(breadcrumbs).toEqual([
263+
{
264+
category: 'ui.click',
265+
data: {
266+
node: {
267+
attributes: {
268+
id: 'mouseDownButton',
269+
},
270+
id: expect.any(Number),
271+
tagName: 'button',
272+
textContent: '******* ******** ** ***** ****',
273+
},
274+
nodeId: expect.any(Number),
275+
},
276+
message: 'body > button#mouseDownButton',
277+
timestamp: expect.any(Number),
278+
type: 'default',
279+
},
280+
]);
281+
});

packages/browser-integration-tests/suites/replay/slowClick/scroll/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ sentryTest('late scroll triggers slow click', async ({ getLocalTestUrl, page })
8989
expect(slowClickBreadcrumbs).toEqual([
9090
{
9191
category: 'ui.slowClickDetected',
92+
type: 'default',
9293
data: {
9394
endReason: 'timeout',
95+
clickCount: 1,
9496
node: {
9597
attributes: {
9698
id: 'scrollLateButton',

packages/browser-integration-tests/suites/replay/slowClick/template.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<button id="scrollButton">Trigger scroll</button>
1919
<button id="scrollLateButton">Trigger scroll late</button>
2020
<button id="mutationIgnoreButton" class="ignore-class">Trigger scroll late</button>
21+
<button id="mouseDownButton">Trigger mutation on mouse down</button>
2122

2223
<a href="#" id="link">Link</a>
2324
<a href="#" target="_blank" id="linkExternal">Link external</a>
@@ -69,6 +70,9 @@ <h1 id="h2">Bottom</h1>
6970
console.log('DONE');
7071
}, 3001);
7172
});
73+
document.getElementById('mouseDownButton').addEventListener('mousedown', () => {
74+
document.getElementById('out').innerHTML += 'mutationButton clicked<br>';
75+
});
7276

7377
// Do nothing on these elements
7478
document

packages/browser-integration-tests/suites/replay/slowClick/timeout/test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ sentryTest('mutation after timeout results in slow click', async ({ getLocalTest
3838
expect(slowClickBreadcrumbs).toEqual([
3939
{
4040
category: 'ui.slowClickDetected',
41+
type: 'default',
4142
data: {
4243
endReason: 'timeout',
44+
clickCount: 1,
4345
node: {
4446
attributes: {
4547
id: 'mutationButtonLate',
@@ -93,8 +95,10 @@ sentryTest('console.log results in slow click', async ({ getLocalTestUrl, page }
9395
expect(slowClickBreadcrumbs).toEqual([
9496
{
9597
category: 'ui.slowClickDetected',
98+
type: 'default',
9699
data: {
97100
endReason: 'timeout',
101+
clickCount: 1,
98102
node: {
99103
attributes: {
100104
id: 'consoleLogButton',

packages/browser/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/browser",
3-
"version": "7.54.0",
3+
"version": "7.55.2",
44
"description": "Official Sentry SDK for browsers",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -16,15 +16,15 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry-internal/tracing": "7.54.0",
20-
"@sentry/core": "7.54.0",
21-
"@sentry/replay": "7.54.0",
22-
"@sentry/types": "7.54.0",
23-
"@sentry/utils": "7.54.0",
19+
"@sentry-internal/tracing": "7.55.2",
20+
"@sentry/core": "7.55.2",
21+
"@sentry/replay": "7.55.2",
22+
"@sentry/types": "7.55.2",
23+
"@sentry/utils": "7.55.2",
2424
"tslib": "^1.9.3"
2525
},
2626
"devDependencies": {
27-
"@sentry-internal/integration-shims": "7.54.0",
27+
"@sentry-internal/integration-shims": "7.55.2",
2828
"@types/md5": "2.1.33",
2929
"btoa": "^1.2.1",
3030
"chai": "^4.1.2",

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/core",
3-
"version": "7.54.0",
3+
"version": "7.55.2",
44
"description": "Base implementation for all Sentry JavaScript SDKs",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
@@ -16,8 +16,8 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/types": "7.54.0",
20-
"@sentry/utils": "7.54.0",
19+
"@sentry/types": "7.55.2",
20+
"@sentry/utils": "7.55.2",
2121
"tslib": "^1.9.3"
2222
},
2323
"scripts": {

0 commit comments

Comments
 (0)