Skip to content

Commit 43965f2

Browse files
authored
Merge pull request getsentry#7158 from getsentry/prepare-release/7.37.2
meta: Update Changelog for 7.37.2
2 parents 28b17fb + 53046d8 commit 43965f2

File tree

26 files changed

+128
-109
lines changed

26 files changed

+128
-109
lines changed

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ jobs:
533533
- bundle_es5_min
534534
- bundle_es6
535535
- bundle_es6_min
536+
- bundle_replay_es6
537+
- bundle_replay_es6_min
536538
tracing_only:
537539
- true
538540
- false

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44

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

7+
## 7.37.2
8+
9+
This release includes changes and fixes around text masking and blocking in Replay's `rrweb` dependency. See versions [1.102.0](https://github.com/getsentry/rrweb/releases/tag/1.102.0) and [1.103.0](https://github.com/getsentry/rrweb/releases/tag/1.103.0).
10+
11+
- feat: Check `blockSelector` for blocking elements as well
12+
- feat: With maskAllText, mask the attributes: placeholder, title, `aria-label`
13+
- feat: fix masking on `textarea`
14+
- feat: Add `maskAllText` option
15+
16+
SDK Changes:
17+
18+
- fix(replay): Fix svgs not getting unblocked (#7132)
19+
720
## 7.37.1
821

922
- fix(browser): Support `async` in stack frame urls (#7131)

MIGRATION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export function makeMyCustomTransport(options: BaseTransportOptions): Transport
254254
}
255255

256256
// `createTransport` takes care of rate limiting and flushing
257-
return createTransport({ bufferSize: options.bufferSize }, makeRequest);
257+
return createTransport(options, makeRequest);
258258
}
259259

260260
Sentry.init({

packages/integration-tests/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
"test:bundle:es5:min": "PW_BUNDLE=bundle_es5_min yarn test",
2424
"test:bundle:es6": "PW_BUNDLE=bundle_es6 yarn test",
2525
"test:bundle:es6:min": "PW_BUNDLE=bundle_es6_min yarn test",
26+
"test:bundle:replay:es6": "PW_BUNDLE=bundle_replay_es6 yarn test",
27+
"test:bundle:replay:es6:min": "PW_BUNDLE=bundle_replay_es6_min yarn test",
2628
"test:cjs": "PW_BUNDLE=cjs yarn test",
2729
"test:esm": "PW_BUNDLE=esm yarn test",
2830
"test:ci": "playwright test ./suites --browser='all' --reporter='line'"

packages/integration-tests/suites/replay/captureReplay/test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import type { ReplayEvent } from '@sentry/types';
44

55
import { sentryTest } from '../../../utils/fixtures';
66
import { envelopeRequestParser } from '../../../utils/helpers';
7-
import { waitForReplayRequest } from '../../../utils/replayHelpers';
7+
import { shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers';
88

99
sentryTest('should capture replays', async ({ getLocalTestPath, page }) => {
10-
// Replay bundles are es6 only
11-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) {
10+
if (shouldSkipReplayTest()) {
1211
sentryTest.skip();
1312
}
1413

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 500,
76
flushMaxDelay: 500,
87
useCompression: true,

packages/integration-tests/suites/replay/compression/test.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../utils/fixtures';
44
import { getExpectedReplayEvent } from '../../../utils/replayEventTemplates';
5-
import { getFullRecordingSnapshots, getReplayEvent, waitForReplayRequest } from '../../../utils/replayHelpers';
5+
import {
6+
getFullRecordingSnapshots,
7+
getReplayEvent,
8+
shouldSkipReplayTest,
9+
waitForReplayRequest,
10+
} from '../../../utils/replayHelpers';
611

712
sentryTest('replay recording should be compressed by default', async ({ getLocalTestPath, page }) => {
8-
// Replay bundles are es6 only
9-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) {
13+
if (shouldSkipReplayTest()) {
1014
sentryTest.skip();
1115
}
1216

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 500,
76
flushMaxDelay: 500,
87
useCompression: false,

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

+10-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ import {
1010
expectedNavigationPerformanceSpan,
1111
getExpectedReplayEvent,
1212
} from '../../../utils/replayEventTemplates';
13-
import { getCustomRecordingEvents, getReplayEvent, waitForReplayRequest } from '../../../utils/replayHelpers';
13+
import {
14+
getCustomRecordingEvents,
15+
getReplayEvent,
16+
shouldSkipReplayTest,
17+
waitForReplayRequest,
18+
} from '../../../utils/replayHelpers';
1419

1520
sentryTest(
1621
'replay recording should contain default performance spans',
1722
async ({ getLocalTestPath, page, browserName }) => {
18-
// Replay bundles are es6 only and most performance entries are only available in chromium
19-
if ((process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) || browserName !== 'chromium') {
23+
// We only test this against the NPM package and replay bundles
24+
// and only on chromium as most performance entries are only available in chromium
25+
if (shouldSkipReplayTest() || browserName !== 'chromium') {
2026
sentryTest.skip();
2127
}
2228

@@ -68,8 +74,7 @@ sentryTest(
6874
sentryTest(
6975
'replay recording should contain a click breadcrumb when a button is clicked',
7076
async ({ getLocalTestPath, page }) => {
71-
// Replay bundles are es6 only
72-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) {
77+
if (shouldSkipReplayTest()) {
7378
sentryTest.skip();
7479
}
7580

packages/integration-tests/suites/replay/errorResponse/test.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../utils/fixtures';
4-
import { getReplaySnapshot, REPLAY_DEFAULT_FLUSH_MAX_DELAY, waitForReplayRequest } from '../../../utils/replayHelpers';
4+
import {
5+
getReplaySnapshot,
6+
REPLAY_DEFAULT_FLUSH_MAX_DELAY,
7+
shouldSkipReplayTest,
8+
waitForReplayRequest,
9+
} from '../../../utils/replayHelpers';
510

611
sentryTest('should stop recording after receiving an error response', async ({ getLocalTestPath, page }) => {
7-
// Currently bundle tests are not supported for replay
8-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) {
12+
if (shouldSkipReplayTest()) {
913
sentryTest.skip();
1014
}
11-
1215
let called = 0;
1316

1417
await page.route('https://dsn.ingest.sentry.io/**/*', route => {

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
});

packages/integration-tests/suites/replay/privacy/template.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<div data-sentry-unmask>This should be unmasked due to data attribute</div>
88
<input placeholder="Placeholder should be masked" />
99
<div title="Title should be masked">Title should be masked</div>
10-
<svg style="width:200px;height:200px" viewBox="0 0 80 80"><path d=""/></svg>
11-
<svg style="width:200px;height:200px" class="sentry-unblock" viewBox="0 0 80 80" data-sentry-unblock><path d=""/></svg>
10+
<svg style="width:200px;height:200px" viewBox="0 0 80 80"><path d=""/><area /><rect /></svg>
11+
<svg style="width:200px;height:200px" viewBox="0 0 80 80" data-sentry-unblock><path d=""/><area /><rect /></svg>
1212
<img style="width:100px;height:100px" src="file:///none.png" />
1313
<img data-sentry-unblock style="width:100px;height:100px" src="file:///none.png" />
1414
</body>

packages/integration-tests/suites/replay/privacy/test.ts

+28-15
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import type { RecordingEvent } from '@sentry/replay/build/npm/types/types';
44

55
import { sentryTest } from '../../../utils/fixtures';
66
import { envelopeRequestParser } from '../../../utils/helpers';
7-
import { waitForReplayRequest } from '../../../utils/replayHelpers';
7+
import { shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers';
88

99
sentryTest('should have the correct default privacy settings', async ({ getLocalTestPath, page }) => {
10-
// Replay bundles are es6 only
11-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) {
10+
if (shouldSkipReplayTest()) {
1211
sentryTest.skip();
1312
}
1413

@@ -80,7 +79,7 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
8079
type: 2,
8180
tagName: 'button',
8281
attributes: {
83-
'aria-label': 'Click me',
82+
'aria-label': '***** **',
8483
onclick: "console.log('Test log')",
8584
},
8685
childNodes: [
@@ -139,7 +138,7 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
139138
type: 2,
140139
tagName: 'input',
141140
attributes: {
142-
placeholder: 'Placeholder should be masked',
141+
placeholder: '*********** ****** ** ******',
143142
},
144143
childNodes: [],
145144
id: 18,
@@ -153,7 +152,7 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
153152
type: 2,
154153
tagName: 'div',
155154
attributes: {
156-
title: 'Title should be masked',
155+
title: '***** ****** ** ******',
157156
},
158157
childNodes: [
159158
{
@@ -190,7 +189,6 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
190189
tagName: 'svg',
191190
attributes: {
192191
style: 'width:200px;height:200px',
193-
class: 'sentry-unblock',
194192
viewBox: '0 0 80 80',
195193
'data-sentry-unblock': '',
196194
},
@@ -199,21 +197,36 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
199197
type: 2,
200198
tagName: 'path',
201199
attributes: {
202-
rr_width: '0px',
203-
rr_height: '0px',
200+
d: '',
204201
},
205202
childNodes: [],
206203
isSVG: true,
207204
id: 26,
208205
},
206+
{
207+
type: 2,
208+
tagName: 'area',
209+
attributes: {},
210+
childNodes: [],
211+
isSVG: true,
212+
id: 27,
213+
},
214+
{
215+
type: 2,
216+
tagName: 'rect',
217+
attributes: {},
218+
childNodes: [],
219+
isSVG: true,
220+
id: 28,
221+
},
209222
],
210223
isSVG: true,
211224
id: 25,
212225
},
213226
{
214227
type: 3,
215228
textContent: '\n ',
216-
id: 27,
229+
id: 29,
217230
},
218231
{
219232
type: 2,
@@ -223,12 +236,12 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
223236
rr_height: '100px',
224237
},
225238
childNodes: [],
226-
id: 28,
239+
id: 30,
227240
},
228241
{
229242
type: 3,
230243
textContent: '\n ',
231-
id: 29,
244+
id: 31,
232245
},
233246
{
234247
type: 2,
@@ -239,17 +252,17 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
239252
src: 'file:///none.png',
240253
},
241254
childNodes: [],
242-
id: 30,
255+
id: 32,
243256
},
244257
{
245258
type: 3,
246259
textContent: '\n ',
247-
id: 31,
260+
id: 33,
248261
},
249262
{
250263
type: 3,
251264
textContent: '\n\n',
252-
id: 32,
265+
id: 34,
253266
},
254267
],
255268
id: 7,

packages/integration-tests/suites/replay/sampling/init.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
});

packages/integration-tests/suites/replay/sampling/test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../utils/fixtures';
4-
import { getReplaySnapshot } from '../../../utils/replayHelpers';
4+
import { getReplaySnapshot, shouldSkipReplayTest } from '../../../utils/replayHelpers';
55

66
sentryTest('should not send replays if both sample rates are 0', async ({ getLocalTestPath, page }) => {
7-
// Replay bundles are es6 only
8-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) {
7+
if (shouldSkipReplayTest()) {
98
sentryTest.skip();
109
}
1110

0 commit comments

Comments
 (0)