Skip to content

Conversation

@BeltranBulbarellaDD
Copy link
Contributor

@BeltranBulbarellaDD BeltranBulbarellaDD commented Dec 10, 2025

Motivation

The idea is to be able to inject the SDK on a page that does not have it. Injecting the local version and CDN version.

Changes

Added new button: Inject Prod CDN.
Remove old override, now redirect does what override did.

Test instructions

Build the dev extension and while running the local SDK do yarn dev on the dev extension folder. There in the initial page override using redirect. Go to any page without the SDK and inject the CDN Prod

Screen.Recording.2025-12-11.at.15.41.37.mov

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Dec 10, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 164.30 KiB 164.30 KiB 0 B 0.00%
Rum Profiler 5.21 KiB 5.21 KiB 0 B 0.00%
Rum Recorder 19.74 KiB 19.74 KiB 0 B 0.00%
Logs 56.14 KiB 56.14 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 121.57 KiB 121.57 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.005 0.005 0.00%
RUM - add action 0.0121 0.014 +15.70%
RUM - add error 0.0167 0.0149 -10.78%
RUM - add timing 0.0034 0.0047 +38.24%
RUM - start view 0.0037 0.0042 +13.51%
RUM - start/stop session replay recording 0.0007 0.0008 +14.29%
Logs - log message 0.0161 0.0184 +14.29%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 25.96 KiB 26.10 KiB +140 B
RUM - add action 49.86 KiB 49.58 KiB -288 B
RUM - add timing 25.48 KiB 25.09 KiB -402 B
RUM - add error 52.24 KiB 52.69 KiB +457 B
RUM - start/stop session replay recording 23.53 KiB 24.80 KiB +1.27 KiB
RUM - start view 427.99 KiB 423.74 KiB -4.25 KiB
Logs - log message 43.83 KiB 42.81 KiB -1.02 KiB

🔗 RealWorld

@BeltranBulbarellaDD
Copy link
Contributor Author

@codex

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@BeltranBulbarellaDD
Copy link
Contributor Author

@codex please review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@BeltranBulbarellaDD
Copy link
Contributor Author

@codex pls review

Copy link

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

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.

ℹ️ 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".

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 10, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 100.00%
Overall Coverage: 92.62% (+0.00%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b08c7a9 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@BeltranBulbarellaDD BeltranBulbarellaDD changed the title add injection Make the Dev Ext capable of Injecting CDN SDK Dec 10, 2025
@BeltranBulbarellaDD
Copy link
Contributor Author

@codex pls review

sdkCode = sdkCode.replace(
/__webpack_require__\.p\s*=\s*[^;]+;/g,
`__webpack_require__.p = ${JSON.stringify(baseUrl)};`
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because the SDK tried to load the recorder from the wrong place. So when we inject and then override need to adjust the recorder URL.
Open to suggestions!

Copy link

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

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.

ℹ️ 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".

@BeltranBulbarellaDD BeltranBulbarellaDD marked this pull request as ready for review December 11, 2025 18:50
@BeltranBulbarellaDD BeltranBulbarellaDD requested a review from a team as a code owner December 11, 2025 18:50
Copy link

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

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.

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants