Repository navigation
Conversation
Key active probes by the opaque function ID the build plugin embeds in each instrumented function, delivered as `where.functionId`, instead of rebuilding it from `typeName;methodName`. Probes without `where.functionId` are ignored. `typeName` and `methodName` remain display fields for snapshot locations and RUM actions. This lets probes target anonymous functions and any other function whose name or path the UI and MCP can't reproduce. Environment: Datadog workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 7f31c42 | Docs | View more details | Give us feedback! |
2 of 5 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Do not merge yet. Once this ships, the SDK ignores every probe without
where.functionId. Today no probe has one, so browser probes would stop firing. Merge only after these are deployed:where.functionIdwhere.functionIdMotivation
DEBUG-6326, part of DEBUG-6321.
The SDK matched a probe by rebuilding the build plugin's function ID from
where.typeName + ';' + where.methodName. The UI and MCP compute those two fields themselves, and they often disagree with the plugin: arrow functions, anonymous functions, computed keys, compiled names, monorepo paths. When they disagree, the probe is accepted but never fires, with no error.In the epic, the build plugin is the only thing that defines function IDs. The UI and MCP copy the ID from SymDB into
where.functionId, and the SDK uses it as-is.Changes
ProbeWheregains a requiredfunctionId.addProbekeysactiveProbesbywhere.functionId. ThetypeName;methodNameconcatenation and its anonymous-function TODO are removed.where.functionId. There is no fallback to the old key, as the epic agreed.typeNameandmethodNamestay optional display fields. They are still copied into the snapshot (logger.name/logger.method,debugger.snapshot.probe.location) and into the RUM action, unchanged.<path>;<anonymous>@<line>:<col>:<index>) now work, because the ID is never parsed.makeProbehelper and the performance test server now sendwhere.functionId.Test instructions
yarn test:unit --spec packages/browser-debugger/src/domain/probes.spec.tsyarn test:unit --spec packages/browser-debugger/src/domain/deliveryApi.spec.tsyarn test:unit --spec packages/browser-debugger/src/domain/api.spec.tsyarn test:e2e -g "debugger"New unit tests cover:
where.functionId, including an anonymous-function ID;where.functionId;Restoring the old key makes 9 tests fail.
Checklist
🤖 Generated with Claude Code