Skip to content

Commit 87358ab

Browse files
committed
πŸ“ Correct enablePrivacyForActionName: false does not restore innerText
1 parent 8382ab0 commit 87358ab

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

  • .claude/skills/upgrade-browser-sdk-v7

β€Ž.claude/skills/upgrade-browser-sdk-v7/SKILL.mdβ€Ž

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,20 @@ Search: `grep -rn "strategy" --include="*.js" --include="*.ts" --include="*.tsx"
187187

188188
These are **default changes** β€” no code breaks, but behavior differs from v6:
189189

190-
| Change | Impact | Action if needed |
191-
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
192-
| `defaultPrivacyLevel` defaults to `"mask-user-input"` (was `"mask"`) | Less restrictive masking out of the box. Only user input is masked. | Set `defaultPrivacyLevel: "mask"` to preserve full masking. |
193-
| `enablePrivacyForActionName` defaults to `true` | Action names are derived from `textContent` instead of `innerText` β€” CSS `text-transform` is no longer applied. A button with `style="text-transform: capitalize"` and raw text `"audio"` yields `"Audio"` in v6 but `"audio"` in v7. Names may also be masked based on privacy level. | Set `enablePrivacyForActionName: false` to restore `innerText`-based names (CSS-aware). Use the [Datadog build plugin](https://github.com/DataDog/build-plugins) for annotation-based control. |
194-
| `propagateTraceBaggage` defaults to `true` | CORS: cross-origin APIs must allow `baggage` header. | Add `"baggage"` to `Access-Control-Allow-Headers`, or set `propagateTraceBaggage: false`. |
195-
| Deterministic sampling | Sampling computed from session ID + rate, not stored. Consistent across pages. | Review if you use different sample rates on different pages. |
196-
| FID removed | First Input Delay no longer collected. | Use INP (Interaction to Next Paint) instead. |
197-
| `session_renewal` view loading type | Session-renewed views have `@view.loading_type:session_renewal` instead of `route_change`. | Update dashboards/monitors filtering on `@view.loading_type`. |
198-
| Document resource `initiatorType` changed | `"initial_document"` becomes `"navigation"`. Duration may differ slightly. | Update any code inspecting document resource `performanceEntry`. |
199-
| Action names may change | Tree walker strategy always used (including Shadow DOM). With `enablePrivacyForActionName: true` (new default), names are read from `textContent` instead of `innerText` β€” CSS `text-transform` (capitalize, uppercase, lowercase) is no longer reflected. Monitors with case-sensitive filters on visually-transformed names may break. | Set `enablePrivacyForActionName: false` to restore CSS-aware name extraction, or update monitors to match the raw text values. |
200-
| Cancelled request errors removed (Logs) | Aborted fetch/XHR no longer generate network error logs. | No action needed β€” reduces noise. |
201-
| Logs always requires session storage | Without cookies or localStorage, Logs SDK won't start. | Use `sessionPersistence: 'memory'` for worker environments. |
202-
| Session Replay: Change Records | New serialization format. More accurate, less bandwidth. | Update if you depend on raw segment format. |
203-
| Async chunk names prefixed with `datadog` | e.g., `datadogRecorder-<hash>-datadog-rum.js`, `datadogProfiler-<hash>-datadog-rum.js`. | Update CSP `script-src` rules or caching configs (allow `datadog*-datadog-rum.js`). |
190+
| Change | Impact | Action if needed |
191+
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
192+
| `defaultPrivacyLevel` defaults to `"mask-user-input"` (was `"mask"`) | Less restrictive masking out of the box. Only user input is masked. | Set `defaultPrivacyLevel: "mask"` to preserve full masking. |
193+
| `enablePrivacyForActionName` defaults to `true` | Action names are derived from `textContent` (not `innerText`) β€” CSS `text-transform` is no longer applied. A button with `style="text-transform: capitalize"` and raw text `"audio"` yields `"Audio"` in v6 but `"audio"` in v7. Names may also be masked based on privacy level. **Note:** setting this to `false` does not restore CSS-aware extraction β€” v7 always uses `textContent`. | Add `data-dd-action-name` attributes to elements whose display names relied on CSS transforms, or update monitors to match raw text values. Use the [Datadog build plugin](https://github.com/DataDog/build-plugins) for annotation-based control. |
194+
| `propagateTraceBaggage` defaults to `true` | CORS: cross-origin APIs must allow `baggage` header. | Add `"baggage"` to `Access-Control-Allow-Headers`, or set `propagateTraceBaggage: false`. |
195+
| Deterministic sampling | Sampling computed from session ID + rate, not stored. Consistent across pages. | Review if you use different sample rates on different pages. |
196+
| FID removed | First Input Delay no longer collected. | Use INP (Interaction to Next Paint) instead. |
197+
| `session_renewal` view loading type | Session-renewed views have `@view.loading_type:session_renewal` instead of `route_change`. | Update dashboards/monitors filtering on `@view.loading_type`. |
198+
| Document resource `initiatorType` changed | `"initial_document"` becomes `"navigation"`. Duration may differ slightly. | Update any code inspecting document resource `performanceEntry`. |
199+
| Action names may change | Tree walker + `textContent` always used in v7 (including Shadow DOM) β€” CSS `text-transform` is never reflected regardless of `enablePrivacyForActionName`. Monitors with case-sensitive filters on visually-transformed names may break. | Add `data-dd-action-name` attributes to affected elements, or update monitors to match raw text values. |
200+
| Cancelled request errors removed (Logs) | Aborted fetch/XHR no longer generate network error logs. | No action needed β€” reduces noise. |
201+
| Logs always requires session storage | Without cookies or localStorage, Logs SDK won't start. | Use `sessionPersistence: 'memory'` for worker environments. |
202+
| Session Replay: Change Records | New serialization format. More accurate, less bandwidth. | Update if you depend on raw segment format. |
203+
| Async chunk names prefixed with `datadog` | e.g., `datadogRecorder-<hash>-datadog-rum.js`, `datadogProfiler-<hash>-datadog-rum.js`. | Update CSP `script-src` rules or caching configs (allow `datadog*-datadog-rum.js`). |
204204

205205
## Step 6: Update infrastructure
206206

0 commit comments

Comments
Β (0)