Skip to content

✨[MFE] Source code context event enrichment#4255

Open
amortemousque wants to merge 1 commit intomainfrom
aymeric/ga-source-code-enrichment
Open

✨[MFE] Source code context event enrichment#4255
amortemousque wants to merge 1 commit intomainfrom
aymeric/ga-source-code-enrichment

Conversation

@amortemousque
Copy link
Collaborator

Motivation

Release source code context event enrichment by removing the feature flag

Changes

Remove source_code_context feature flag

Test instructions

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

@amortemousque amortemousque requested a review from a team as a code owner February 27, 2026 15:43
@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 27, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 174.03 KiB 173.95 KiB -90 B -0.05%
Rum Profiler 4.71 KiB 4.71 KiB 0 B 0.00%
Rum Recorder 24.88 KiB 24.88 KiB 0 B 0.00%
Logs 56.54 KiB 56.50 KiB -44 B -0.08%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 129.73 KiB 129.65 KiB -82 B -0.06%
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.0054 0.0041 -24.07%
RUM - add action 0.0174 0.014 -19.54%
RUM - add error 0.0206 0.0134 -34.95%
addtiming N/A 0.003 N/A
RUM - start view 0.0175 0.015 -14.29%
RUM - start/stop session replay recording 0.0012 0.0007 -41.67%
Logs - log message 0.0256 0.0199 -22.27%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 27.06 KiB 27.17 KiB +109 B
RUM - add action 50.07 KiB 52.49 KiB +2.42 KiB
RUM - add timing 26.31 KiB 26.36 KiB +52 B
RUM - add error 55.85 KiB 55.69 KiB -167 B
RUM - start/stop session replay recording 25.55 KiB 25.10 KiB -463 B
RUM - start view 450.00 KiB 426.90 KiB -23.10 KiB
Logs - log message 45.01 KiB 100.28 KiB +55.28 KiB

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 27, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.17% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 26f06cf | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

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.

Reviewed commit: 26f06cf120

ℹ️ 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 on lines 22 to 23
export function startSourceCodeContext(hooks: Hooks) {
if (!isExperimentalFeatureEnabled(ExperimentalFeature.SOURCE_CODE_CONTEXT)) {
return
}

const browserWindow = window as BrowserWindow

Choose a reason for hiding this comment

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

P2 Badge Skip source-context hook when no context is configured

Removing the early return in startSourceCodeContext means every RUM session now registers this assemble hook, even when window.DD_SOURCE_CODE_CONTEXT is never provided; in that case the hook still runs for each event and calls getSourceUrl, which parses stack input on the hot path with no chance of producing enrichment. On high-event pages this introduces avoidable per-event CPU overhead for all customers who are not using source-code-context enrichment.

Useful? React with 👍 / 👎.

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.

1 participant