✨[MFE] Source code context event enrichment#4255
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 26f06cf | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
There was a problem hiding this comment.
💡 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".
| export function startSourceCodeContext(hooks: Hooks) { | ||
| if (!isExperimentalFeatureEnabled(ExperimentalFeature.SOURCE_CODE_CONTEXT)) { | ||
| return | ||
| } | ||
|
|
||
| const browserWindow = window as BrowserWindow |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
Release source code context event enrichment by removing the feature flag
Changes
Remove
source_code_contextfeature flagTest instructions
Checklist