Skip to content

🐛 Report CDN bundles as CDN SDK setup - #4934

Merged
BenoitZugmeyer merged 4 commits into
mainfrom
benoit/cdn-sdk-setup
Aug 10, 2026
Merged

🐛 Report CDN bundles as CDN SDK setup#4934
BenoitZugmeyer merged 4 commits into
mainfrom
benoit/cdn-sdk-setup

Conversation

@BenoitZugmeyer

Copy link
Copy Markdown
Member

Motivation

Telemetry emitted by CDN bundles currently reports sdk_setup: "npm". This makes it difficult to accurately understand how customers install and use the Browser SDK.

CDN bundles should report sdk_setup: "cdn", while npm builds should continue reporting sdk_setup: "npm".

Changes

  • Report the correct SDK setup for CDN and npm builds.
  • Simplify the build environment configuration and make build-specific values explicit.

Test instructions

  1. Run yarn build:bundle.
  2. Run rg -o 'sdk_setup.{6}' packages/*/bundle/*.js.
  3. Confirm that CDN bundles report sdk_setup:"cdn".

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

Simplify the build environment configuration and make each build target define its setup and optional values explicitly.
@BenoitZugmeyer
BenoitZugmeyer marked this pull request as ready for review August 7, 2026 13:15
@BenoitZugmeyer
BenoitZugmeyer requested a review from a team as a code owner August 7, 2026 13:15
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 180.61 KiB 180.61 KiB 0 B 0.00%
Rum Profiler 8.43 KiB 8.43 KiB 0 B 0.00%
Rum Recorder 21.12 KiB 21.12 KiB 0 B 0.00%
Logs 57.05 KiB 57.05 KiB 0 B 0.00%
Rum Salesforce N/A 138.49 KiB N/A N/A N/A
Rum Slim 138.49 KiB 138.49 KiB 0 B 0.00%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%
Rum Shopify N/A 200.18 KiB N/A N/A N/A
Rum-shopify Profiler N/A 8.43 KiB N/A N/A N/A
Rum-shopify Recorder N/A 3.72 KiB N/A N/A N/A

@datadog-official

datadog-official Bot commented Aug 7, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.15% (-0.06%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 88a12db | Docs | Datadog PR Page | Give us feedback!

@gogusarov

Copy link
Copy Markdown
Contributor

suggestion

having additional assertions in telemetry.scenario.ts that would check telemetry.sdk_setup === 'cdn'/'npm' would be really nice

Comment thread scripts/dev-server/lib/server.ts Outdated
@BenoitZugmeyer

Copy link
Copy Markdown
Member Author

🤖 Added explicit npm and CDN telemetry setup assertions; this will be included in the next push.

webpackBase({
entry: `${sandboxPath}/react-app/main.tsx`,
plugins: [new HtmlWebpackPlugin({ publicPath: '/react-app/' })],
mode: 'development',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion

it looks like includeWorkerString should be added here as well because otherwise it would cause ReferenceError in createDeflateWorker

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75d75ad32b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/dev-server/lib/server.ts Outdated
Comment thread webpack.base.ts
@BenoitZugmeyer
BenoitZugmeyer merged commit b10226d into main Aug 10, 2026
31 checks passed
@BenoitZugmeyer
BenoitZugmeyer deleted the benoit/cdn-sdk-setup branch August 10, 2026 12:31
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants