Skip to content

Commit 5e9300b

Browse files
Merge remote-tracking branch 'origin/develop' into kw-rn-profiling-share-code
2 parents a42e2db + 1bdf2d9 commit 5e9300b

File tree

107 files changed

+2859
-725
lines changed

Some content is hidden

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

107 files changed

+2859
-725
lines changed

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,87 @@
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+
25+
## 7.54.0
26+
27+
### Important Changes
28+
29+
- **feat(core): Add default entries to `ignoreTransactions` for Healthchecks #8191**
30+
31+
All SDKs now filter out health check transactions by default.
32+
These are transactions where the transaction name matches typical API health check calls, such as `/^.*healthy.*$/` or `/^. *heartbeat.*$/`. Take a look at [this list](https://github.com/getsentry/sentry-javascript/blob/8c6ad156829f7c4eec34e4a67e6dd866ba482d5d/packages/core/src/integrations/inboundfilters.ts#L8C2-L16) to learn which regexes we currently use to match transaction names.
33+
We believe that these transactions do not provide value in most cases and we want to save you some of your quota by filtering them out by default.
34+
These filters are implemented as default values for the top level `ignoreTransactions` option.
35+
36+
You can disable this filtering by manually specifiying the `InboundFilters` integration and setting the `disableTransactionDefaults` option:
37+
```js
38+
Sentry.init({
39+
//...
40+
integrations: [new InboundFilters({ disableTransactionDefaults: true })],
41+
})
42+
```
43+
44+
- **feat(replay): Add `mutationBreadcrumbLimit` and `mutationLimit` to Replay Options (#8228)**
45+
46+
The previously experimental options `mutationBreadcumbLimit` and `mutationLimit` have been promoted to regular Replay integration options.
47+
48+
A high number of DOM mutations (in a single event loop) can cause performance regressions in end-users' browsers.
49+
Use `mutationBreadcrumbLimit` to send a breadcrumb along with your recording if the mutation limit was reached.
50+
Use `mutationLimit` to stop recording if the mutation limit was reached.
51+
52+
- **feat(sveltekit): Add source maps support for Vercel (lambda) (#8256)**
53+
- feat(sveltekit): Auto-detect SvelteKit adapters (#8193)
54+
55+
The SvelteKit SDK can now be used if you deploy your SvelteKit app to Vercel.
56+
By default, the SDK's Vite plugin will detect the used adapter and adjust the source map uploading config as necessary.
57+
If you want to override the default adapter detection, you can specify the `adapter` option in the `sentrySvelteKit` options:
58+
59+
```js
60+
// vite.config.js
61+
export default defineConfig({
62+
plugins: [
63+
sentrySvelteKit({
64+
adapter: 'vercel',
65+
}),
66+
sveltekit(),
67+
],
68+
});
69+
```
70+
71+
Currently, the Vite plugin will configure itself correctly for `@sveltejs/adapter-auto`, `@sveltejs/adapter-vercel` and `@sveltejs/adapter-node`.
72+
73+
**Important:** The SvelteKit SDK is not yet compatible with Vercel's edge runtime.
74+
It will only work for lambda functions.
75+
76+
### Other Changes
77+
78+
- feat(replay): Throttle breadcrumbs to max 300/5s (#8086)
79+
- feat(sveltekit): Add option to control handling of unknown server routes (#8201)
80+
- fix(node): Strip query and fragment from request URLs without route parameters (#8213)
81+
- fix(remix): Don't log missing parameters warning on server-side. (#8269)
82+
- fix(remix): Pass `loadContext` through wrapped document request function (#8268)
83+
- fix(replay): Guard against missing key (#8246)
84+
- fix(sveltekit): Avoid capturing redirects and 4xx Http errors in request Handlers (#8215)
85+
- fix(sveltekit): Bump `magicast` to support `satisfied` keyword (#8254)
86+
- fix(wasm): Avoid throwing an error when WASM modules are loaded from blobs (#8263)
87+
788
## 7.53.1
889

990
- chore(deps): bump socket.io-parser from 4.2.1 to 4.2.3 (#8196)

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.53.1",
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.53.1",
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.53.1",
25-
"@sentry/types": "7.53.1",
26-
"@sentry/utils": "7.53.1",
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.53.1",
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.53.1",
25-
"@sentry/types": "7.53.1",
26-
"@sentry/utils": "7.53.1",
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.53.1",
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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
window.Replay = new Sentry.Replay({
5+
flushMinDelay: 500,
6+
flushMaxDelay: 500,
7+
slowClickTimeout: 0,
8+
});
9+
10+
Sentry.init({
11+
dsn: 'https://[email protected]/1337',
12+
sampleRate: 0,
13+
replaysSessionSampleRate: 1.0,
14+
replaysOnErrorSampleRate: 0.0,
15+
16+
integrations: [window.Replay],
17+
});
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { getCustomRecordingEvents, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
5+
6+
sentryTest('does not capture slow click when slowClickTimeout === 0', 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.click');
30+
});
31+
32+
await page.click('#mutationButton');
33+
34+
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
35+
36+
expect(breadcrumbs).toEqual([
37+
{
38+
category: 'ui.click',
39+
data: {
40+
node: {
41+
attributes: {
42+
id: 'mutationButton',
43+
},
44+
id: expect.any(Number),
45+
tagName: 'button',
46+
textContent: '******* ********',
47+
},
48+
nodeId: expect.any(Number),
49+
},
50+
message: 'body > button#mutationButton',
51+
timestamp: expect.any(Number),
52+
type: 'default',
53+
},
54+
]);
55+
});

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,54 @@ sentryTest('click is ignored on ignoreSelectors', async ({ getLocalTestUrl, page
5454
},
5555
]);
5656
});
57+
58+
sentryTest('click is ignored on div', async ({ getLocalTestUrl, page }) => {
59+
if (shouldSkipReplayTest()) {
60+
sentryTest.skip();
61+
}
62+
63+
const reqPromise0 = waitForReplayRequest(page, 0);
64+
65+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
66+
return route.fulfill({
67+
status: 200,
68+
contentType: 'application/json',
69+
body: JSON.stringify({ id: 'test-id' }),
70+
});
71+
});
72+
73+
const url = await getLocalTestUrl({ testDir: __dirname });
74+
75+
await page.goto(url);
76+
await reqPromise0;
77+
78+
const reqPromise1 = waitForReplayRequest(page, (event, res) => {
79+
const { breadcrumbs } = getCustomRecordingEvents(res);
80+
81+
return breadcrumbs.some(breadcrumb => breadcrumb.category === 'ui.click');
82+
});
83+
84+
await page.click('#mutationDiv');
85+
86+
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
87+
88+
expect(breadcrumbs).toEqual([
89+
{
90+
category: 'ui.click',
91+
data: {
92+
node: {
93+
attributes: {
94+
id: 'mutationDiv',
95+
},
96+
id: expect.any(Number),
97+
tagName: 'div',
98+
textContent: '******* ********',
99+
},
100+
nodeId: expect.any(Number),
101+
},
102+
message: 'body > div#mutationDiv',
103+
timestamp: expect.any(Number),
104+
type: 'default',
105+
},
106+
]);
107+
});

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ window.Sentry = Sentry;
44
window.Replay = new Sentry.Replay({
55
flushMinDelay: 500,
66
flushMaxDelay: 500,
7-
_experiments: {
8-
slowClicks: {
9-
threshold: 300,
10-
scrollThreshold: 300,
11-
timeout: 2000,
12-
ignoreSelectors: ['.ignore-class', '[ignore-attribute]'],
13-
},
14-
},
7+
slowClickTimeout: 3100,
8+
slowClickIgnoreSelectors: ['.ignore-class', '[ignore-attribute]'],
159
});
1610

1711
Sentry.init({
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+
});

0 commit comments

Comments
 (0)