diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5f73684e0ff..9716113ce134 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -533,6 +533,8 @@ jobs: - bundle_es5_min - bundle_es6 - bundle_es6_min + - bundle_replay_es6 + - bundle_replay_es6_min tracing_only: - true - false diff --git a/CHANGELOG.md b/CHANGELOG.md index 451b3c828e26..56c5223e65e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 7.37.2 + +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). + +- feat: Check `blockSelector` for blocking elements as well +- feat: With maskAllText, mask the attributes: placeholder, title, `aria-label` +- feat: fix masking on `textarea` +- feat: Add `maskAllText` option + +SDK Changes: + +- fix(replay): Fix svgs not getting unblocked (#7132) + ## 7.37.1 - fix(browser): Support `async` in stack frame urls (#7131) diff --git a/MIGRATION.md b/MIGRATION.md index 55987041e698..860cf9d38022 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -254,7 +254,7 @@ export function makeMyCustomTransport(options: BaseTransportOptions): Transport } // `createTransport` takes care of rate limiting and flushing - return createTransport({ bufferSize: options.bufferSize }, makeRequest); + return createTransport(options, makeRequest); } Sentry.init({ diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index e1e550e4b5c6..2c6aa55c6552 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -23,6 +23,8 @@ "test:bundle:es5:min": "PW_BUNDLE=bundle_es5_min yarn test", "test:bundle:es6": "PW_BUNDLE=bundle_es6 yarn test", "test:bundle:es6:min": "PW_BUNDLE=bundle_es6_min yarn test", + "test:bundle:replay:es6": "PW_BUNDLE=bundle_replay_es6 yarn test", + "test:bundle:replay:es6:min": "PW_BUNDLE=bundle_replay_es6_min yarn test", "test:cjs": "PW_BUNDLE=cjs yarn test", "test:esm": "PW_BUNDLE=esm yarn test", "test:ci": "playwright test ./suites --browser='all' --reporter='line'" diff --git a/packages/integration-tests/suites/replay/captureReplay/test.ts b/packages/integration-tests/suites/replay/captureReplay/test.ts index e1319c3d0d6b..0801f13101c4 100644 --- a/packages/integration-tests/suites/replay/captureReplay/test.ts +++ b/packages/integration-tests/suites/replay/captureReplay/test.ts @@ -4,11 +4,10 @@ import type { ReplayEvent } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { envelopeRequestParser } from '../../../utils/helpers'; -import { waitForReplayRequest } from '../../../utils/replayHelpers'; +import { shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; sentryTest('should capture replays', async ({ getLocalTestPath, page }) => { - // Replay bundles are es6 only - if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) { + if (shouldSkipReplayTest()) { sentryTest.skip(); } diff --git a/packages/integration-tests/suites/replay/compression/init.js b/packages/integration-tests/suites/replay/compression/init.js index f20e4054e34f..639cf05628e4 100644 --- a/packages/integration-tests/suites/replay/compression/init.js +++ b/packages/integration-tests/suites/replay/compression/init.js @@ -1,8 +1,7 @@ import * as Sentry from '@sentry/browser'; -import { Replay } from '@sentry/replay'; window.Sentry = Sentry; -window.Replay = new Replay({ +window.Replay = new Sentry.Replay({ flushMinDelay: 500, flushMaxDelay: 500, useCompression: true, diff --git a/packages/integration-tests/suites/replay/compression/test.ts b/packages/integration-tests/suites/replay/compression/test.ts index e92d7f2dde40..d9a88a91a995 100644 --- a/packages/integration-tests/suites/replay/compression/test.ts +++ b/packages/integration-tests/suites/replay/compression/test.ts @@ -2,11 +2,15 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { getExpectedReplayEvent } from '../../../utils/replayEventTemplates'; -import { getFullRecordingSnapshots, getReplayEvent, waitForReplayRequest } from '../../../utils/replayHelpers'; +import { + getFullRecordingSnapshots, + getReplayEvent, + shouldSkipReplayTest, + waitForReplayRequest, +} from '../../../utils/replayHelpers'; sentryTest('replay recording should be compressed by default', async ({ getLocalTestPath, page }) => { - // Replay bundles are es6 only - if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) { + if (shouldSkipReplayTest()) { sentryTest.skip(); } diff --git a/packages/integration-tests/suites/replay/customEvents/init.js b/packages/integration-tests/suites/replay/customEvents/init.js index f02e43c7235c..db6a0aa21821 100644 --- a/packages/integration-tests/suites/replay/customEvents/init.js +++ b/packages/integration-tests/suites/replay/customEvents/init.js @@ -1,8 +1,7 @@ import * as Sentry from '@sentry/browser'; -import { Replay } from '@sentry/replay'; window.Sentry = Sentry; -window.Replay = new Replay({ +window.Replay = new Sentry.Replay({ flushMinDelay: 500, flushMaxDelay: 500, useCompression: false, diff --git a/packages/integration-tests/suites/replay/customEvents/test.ts b/packages/integration-tests/suites/replay/customEvents/test.ts index ac900cfe0961..a317ea281e9b 100644 --- a/packages/integration-tests/suites/replay/customEvents/test.ts +++ b/packages/integration-tests/suites/replay/customEvents/test.ts @@ -10,13 +10,19 @@ import { expectedNavigationPerformanceSpan, getExpectedReplayEvent, } from '../../../utils/replayEventTemplates'; -import { getCustomRecordingEvents, getReplayEvent, waitForReplayRequest } from '../../../utils/replayHelpers'; +import { + getCustomRecordingEvents, + getReplayEvent, + shouldSkipReplayTest, + waitForReplayRequest, +} from '../../../utils/replayHelpers'; sentryTest( 'replay recording should contain default performance spans', async ({ getLocalTestPath, page, browserName }) => { - // Replay bundles are es6 only and most performance entries are only available in chromium - if ((process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) || browserName !== 'chromium') { + // We only test this against the NPM package and replay bundles + // and only on chromium as most performance entries are only available in chromium + if (shouldSkipReplayTest() || browserName !== 'chromium') { sentryTest.skip(); } @@ -68,8 +74,7 @@ sentryTest( sentryTest( 'replay recording should contain a click breadcrumb when a button is clicked', async ({ getLocalTestPath, page }) => { - // Replay bundles are es6 only - if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) { + if (shouldSkipReplayTest()) { sentryTest.skip(); } diff --git a/packages/integration-tests/suites/replay/errorResponse/test.ts b/packages/integration-tests/suites/replay/errorResponse/test.ts index 68b90697410c..d81d16196b8e 100644 --- a/packages/integration-tests/suites/replay/errorResponse/test.ts +++ b/packages/integration-tests/suites/replay/errorResponse/test.ts @@ -1,14 +1,17 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; -import { getReplaySnapshot, REPLAY_DEFAULT_FLUSH_MAX_DELAY, waitForReplayRequest } from '../../../utils/replayHelpers'; +import { + getReplaySnapshot, + REPLAY_DEFAULT_FLUSH_MAX_DELAY, + shouldSkipReplayTest, + waitForReplayRequest, +} from '../../../utils/replayHelpers'; sentryTest('should stop recording after receiving an error response', async ({ getLocalTestPath, page }) => { - // Currently bundle tests are not supported for replay - if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_es5')) { + if (shouldSkipReplayTest()) { sentryTest.skip(); } - let called = 0; await page.route('https://dsn.ingest.sentry.io/**/*', route => { diff --git a/packages/integration-tests/suites/replay/init.js b/packages/integration-tests/suites/replay/init.js index 16b46e3adc54..7a0337445768 100644 --- a/packages/integration-tests/suites/replay/init.js +++ b/packages/integration-tests/suites/replay/init.js @@ -1,8 +1,7 @@ import * as Sentry from '@sentry/browser'; -import { Replay } from '@sentry/replay'; window.Sentry = Sentry; -window.Replay = new Replay({ +window.Replay = new Sentry.Replay({ flushMinDelay: 200, flushMaxDelay: 200, }); diff --git a/packages/integration-tests/suites/replay/privacy/template.html b/packages/integration-tests/suites/replay/privacy/template.html index aa916d3f116e..a61532e6ae68 100644 --- a/packages/integration-tests/suites/replay/privacy/template.html +++ b/packages/integration-tests/suites/replay/privacy/template.html @@ -7,8 +7,8 @@