Upgrade Browser Sdk V6 logo

Upgrade Browser Sdk V6

Organization
datadog-labs
upgrade-browser-sdk-v6

Upgrade Datadog Browser SDK from v5 to v6. Use when encountering removed options like useCrossSiteSessionCookie, sendLogsAfterSessionExpiration, or when dropping IE11 support, or when a project references datadoghq-browser-agent.com CDN with /v5/ paths.

Overview

Publisherdatadog-labs
Repositoryagent-skills
Skill nameupgrade-browser-sdk-v6
Stars
172
Forks
28
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by datadog-labs on GitHub. Read the source before you install it.

Installation

Install the Upgrade Browser Sdk V6 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/datadog-labs/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/dd-browser-sdk/upgrade-v6 .claude/skills/upgrade-browser-sdk-v6
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Upgrade Browser Sdk V6 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Upgrade Browser Sdk V6 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Upgrade Browser Sdk V6 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Upgrade Datadog Browser SDK to v6

Systematic migration guide from v5 to v6. Follow steps 1-6 in order. Each step includes a search pattern to find affected code.

Step 1: Update SDK version

CDN setup — update script src URLs:

v5 patternv6 replacement
datadoghq-browser-agent.com/us1/v5/datadog-rum.jsdatadoghq-browser-agent.com/us1/v6/datadog-rum.js
datadoghq-browser-agent.com/us1/v5/datadog-logs.jsdatadoghq-browser-agent.com/us1/v6/datadog-logs.js
datadoghq-browser-agent.com/us1/v5/datadog-rum-slim.jsdatadoghq-browser-agent.com/us1/v6/datadog-rum-slim.js

Replace us1 with your site: eu1, us3, us5, ap1, ap2. For US1-FED, the pattern is flat with no site prefix: datadog-rum-v6.js, datadog-logs-v6.js, datadog-rum-slim-v6.js.

Search: grep -r "datadoghq-browser-agent.com.*v5" --include="*.html" --include="*.js" --include="*.ts" --include="*.tsx" --include="*.jsx"

npm setup — update package.json dependencies:

"@datadog/browser-rum": "^6.0.0"
"@datadog/browser-logs": "^6.0.0"
"@datadog/browser-rum-slim": "^6.0.0"

Then run your package manager (npm install, yarn install, etc.) and rebuild.

Also upgrade framework integrations to v6 if used: @datadog/browser-rum-react.

Search: grep -r "@datadog/browser-" --include="package.json" .

Step 2: Remove deprecated options

Removed from Core (affects both RUM and Logs)

OptionAction
useCrossSiteSessionCookieReplace with usePartitionedCrossSiteSessionCookie.

Removed from Logs

OptionAction
sendLogsAfterSessionExpirationDelete. In v6, logs are always sent after session expiration (without a session ID). The option is no longer needed.

Search: grep -rn 'useCrossSiteSessionCookie\|sendLogsAfterSessionExpiration' --include="*.js" --include="*.ts" --include="*.tsx" --include="*.jsx" --include="*.html" --include="*.vue" --include="*.svelte"

Step 3: Update changed defaults

v6 changes several default behaviors. Review each and adjust if needed:

3a. trackUserInteractions, trackResources, and trackLongTasks default to true

In v5, these were false by default. In v6, they are enabled out of the box. This does not impact billing.

To preserve v5 behavior, explicitly disable only the options that were not already enabled in v5. If an option was already true in v5, leave it unchanged:

js
DD_RUM.init({
  trackUserInteractions: false, // only if not already true in v5
  trackResources: false, // only if not already true in v5
  trackLongTasks: false, // only if not already true in v5
})

3b. traceContextInjection defaults to "sampled"

In v5, trace context was injected for all requests. In v6, it's only injected for sampled traces. If your traceSampleRate is 100% (the default), this has no impact.

To preserve v5 behavior:

js
DD_RUM.init({
  traceContextInjection: 'all',
})

3c. tracestate header added with tracecontext propagator

The tracecontext propagator now sends an additional tracestate header. Your server must accept it. Add it to your existing Access-Control-Allow-Headers — do not replace the full list:

# Add tracestate alongside your existing headers
Access-Control-Allow-Headers: <existing-headers>, traceparent, tracestate

3d. site parameter is strongly typed

The site option has a stricter TypeScript type. If you pass a non-standard value, you get a type error. Use proxy for non-standard intake URLs instead.

Search: grep -rn 'trackUserInteractions\|trackResources\|trackLongTasks\|traceContextInjection\|tracestate\|allowedTracingUrls\|propagatorTypes' --include="*.js" --include="*.ts" --include="*.tsx" --include="*.jsx" --include="*.html" --include="*.vue" --include="*.svelte"

Also search for all RUM init calls to catch projects that omit these options and relied on the v5 false defaults: grep -rn 'DD_RUM\.init\|datadogRum\.init' --include="*.js" --include="*.ts" --include="*.tsx" --include="*.jsx" --include="*.html" --include="*.vue" --include="*.svelte". For each init call, check whether trackUserInteractions, trackResources, and trackLongTasks are explicitly set — if omitted, they now default to true in v6.

Step 4: Handle Session Replay lazy loading

Session Replay is now lazy-loaded using dynamic imports. The module loads only for sessions sampled for replay, reducing bundle size for others.

npm setup

Ensure your bundler supports dynamic imports (code splitting). Most modern bundlers do:

CDN setup

No code changes needed. The SDK dynamically loads an additional chunk when recording (e.g., datadogRecorder-<hash>-datadog-rum.js). Update CSP script-src rules if needed to allow the chunk.

Step 5: Review behavioral changes (no code required, but may need attention)

ChangeImpactAction if needed
IE11 support droppedSDK built with ES2018 target. Polyfills removed.Keep using v5 if IE11 support is required.
Long Animation Frames replace Long TasksOn supported browsers, Long Animation Frames are collected instead of Long Tasks. Event type is still long_task.Review if you inspect long task event details.
Session cookie expiration extended to 1 yearSupports anonymous user tracking.Set trackAnonymousUser: false to opt out.
RegExp and Event objects sanitizedThese are no longer serialized as-is in context/attributes.Use string representations if you were passing RegExp or Event objects.
Webpack ChunkLoadError no longer collectedReduces noise from SDK chunk loading failures.No action needed.

Step 6: Update infrastructure

  • Browser support: ES2018 baseline. IE11 is no longer supported.
  • CORS: Add tracestate to your existing Access-Control-Allow-Headers if using the tracecontext propagator (do not replace the full list): Access-Control-Allow-Headers: <existing-headers>, traceparent, tracestate
  • CSP: Allow the dynamically loaded Session Replay chunk (e.g., datadogRecorder-*-datadog-rum.js) in script-src rules.
  • Bundler config: Ensure your bundler supports dynamic imports for Session Replay lazy loading.

Common Mistakes

MistakeWhat goes wrongFix
Defensively disabling trackUserInteractions, trackResources, trackLongTasksDisables features the project needs — these now default to true, which is usually the desired behaviorOnly set these to false if the project explicitly did not want them; leave them unset to accept the new defaults
Missing tracestate in Access-Control-Allow-HeadersThe tracecontext propagator now sends a tracestate header — cross-origin requests are blocked by CORSAdd tracestate alongside traceparent in your server's Access-Control-Allow-Headers
Not updating CSP script-src for the lazy-loaded Session Replay chunkRecording silently fails on CSP-restricted pages — the dynamic chunk is blockedAllow datadogRecorder-*-datadog-rum.js in script-src

Verification checklist

After upgrading, confirm:

  • SDK loads without console errors
  • No references to removed options (useCrossSiteSessionCookie, sendLogsAfterSessionExpiration)
  • Session Replay recordings working (if used)
  • Distributed tracing working (no CORS errors from tracestate header)
  • Bundle size decreased (IE11 polyfills removed)
  • Long tasks still collected (now as Long Animation Frames on supported browsers)
  • No TypeScript errors from site parameter typing

Frequently asked questions

What does the Upgrade Browser Sdk V6 AI skill do?

Upgrade Datadog Browser SDK from v5 to v6. Use when encountering removed options like useCrossSiteSessionCookie, sendLogsAfterSessionExpiration, or when dropping IE11 support, or when a project references datadoghq-browser-agent.com CDN with /v5/ paths.

Why use Upgrade Browser Sdk V6 on TypingMind?

Because you install it once and use it with any model. Upgrade Browser Sdk V6 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Upgrade Browser Sdk V6 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/datadog-labs/agent-skills/tree/main/dd-browser-sdk/upgrade-v6. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Upgrade Browser Sdk V6?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Upgrade Browser Sdk V6?

As many as you like. As long as a model supports skills, you can use Upgrade Browser Sdk V6 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Upgrade Browser Sdk V6 AI skill free?

Yes. It is published on GitHub by datadog-labs under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇