You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/upgrade-browser-sdk-v5/SKILL.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,6 +251,14 @@ The `"console error:"` prefix is removed from log messages. Update queries using
251
251
252
252
Runtime errors, network logs, report logs, and console logs no longer inherit the main logger's context, level, or handler. Use global context and dedicated init parameters instead.
| Setting `sessionReplaySampleRate > 0` without enabling `trackResources` and `trackLongTasks`| Resources and long tasks are silently not collected — they no longer default to `true` when using `sessionReplaySampleRate`| Always add `trackResources: true, trackLongTasks: true` alongside any non-zero `sessionReplaySampleRate`|
259
+
| Using `context.event` instead of `context.events` in `beforeSend` for action events | Action context property renamed — `context.event` is `undefined`, DOM event details are lost | Update to `context.events` (array); iterate if you need all associated DOM events |
260
+
| Not updating CSP `connect-src` to the new v5 intake domains | SDK silently fails to send data — old intake domains are no longer valid | Update `connect-src` to the v5 intake domain for your site (see Step 7) |
| Defensively disabling `trackUserInteractions`, `trackResources`, `trackLongTasks`| Disables features the project needs — these now default to `true`, which is usually the desired behavior | Only set these to `false` if the project explicitly did not want them; leave them unset to accept the new defaults |
140
+
| Missing `tracestate` in `Access-Control-Allow-Headers`| The `tracecontext` propagator now sends a `tracestate` header — cross-origin requests are blocked by CORS | Add `tracestate` alongside `traceparent` in your server's `Access-Control-Allow-Headers`|
141
+
| Not updating CSP `script-src` for the lazy-loaded Session Replay chunk | Recording silently fails on CSP-restricted pages — the dynamic chunk is blocked | Allow `recorder-*-datadog-rum.js` in `script-src`|
Copy file name to clipboardExpand all lines: .claude/skills/upgrade-browser-sdk-v7/SKILL.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: upgrade-browser-sdk-v7
3
-
description: Use when upgrading Datadog Browser SDK from v6 to v7, when encountering removed options like betaEncodeCookieOptions, allowFallbackToLocalStorage, trackBfcacheViews, usePciIntake, or when a project references datadoghq-browser-agent.com CDN with /v6/ paths
3
+
description: Use when upgrading Datadog Browser SDK from v6 to v7, when encountering removed options like betaEncodeCookieOptions, allowFallbackToLocalStorage, trackBfcacheViews, usePciIntake, changed APIs like forwardErrorsToLogs, startDurationVital, stopDurationVital, or when a project references datadoghq-browser-agent.com CDN with /v6/ paths
@@ -201,6 +201,15 @@ These are **default changes** — no code breaks, but behavior differs from v6:
201
201
-**CORS** (if using `allowedTracingUrls`): Add `"baggage"` to `Access-Control-Allow-Headers` on traced origins — or set `propagateTraceBaggage: false`.
| Replacing `forwardErrorsToLogs: true` with `forwardConsoleLogs: ['error']`| Unhandled errors (uncaught exceptions, unhandled rejections) stop being forwarded to Logs | Keep `forwardErrorsToLogs: true` unchanged and add `forwardConsoleLogs: ['error']` alongside it — they control different things |
209
+
| Updating `startDurationVital` wrapper but not its callers | Callers pass the old ref variable (now `undefined`) to `stopDurationVital` — vital never stops, event never emitted | After updating the wrapper, search for every caller that captures the return value and update the stop call to pass the vital name string directly |
210
+
| Missing `vitalKey` option on `stopDurationVital`| v7 `stopDurationVital` requires `{ vitalKey: string }` to identify which vital to stop | Pass the same string used in `startDurationVital`: `stopDurationVital('name', { vitalKey: 'name' })`|
211
+
| Not checking CDN/plain JS files for ref-based vitals | TypeScript projects surface this as a type error; plain JS silently breaks | Run the Step 2 grep explicitly — don't rely on type errors to find all sites |
212
+
204
213
## Verification checklist
205
214
206
215
After upgrading, confirm:
@@ -212,3 +221,4 @@ After upgrading, confirm:
212
221
-[ ] Distributed tracing working (no CORS errors from baggage header)
213
222
-[ ] No `_dd_s` cookie remaining after first page load (should be `_dd_s_v2`)
214
223
-[ ] Action names acceptable under new privacy defaults
224
+
-[ ] No variables capturing the return value of `startDurationVital` (or wrappers around it) — all stop calls use the vital name string directly
0 commit comments