✨ Add browser debugger Capture Expressions#4731
Open
watson wants to merge 1 commit into
Open
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5 tasks
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 7cdb1b5 | Docs | Datadog PR Page | Give us feedback! |
9f382d9 to
8abb9af
Compare
0edbca8 to
90a1c84
Compare
8abb9af to
6cce48e
Compare
90a1c84 to
284e2b3
Compare
6cce48e to
5c76cd2
Compare
Base automatically changed from
watson/DEBUG-5733/refactor-template-cache
to
main
June 5, 2026 13:17
Support Capture Expressions on browser debugger method probes so users can capture named expression results without collecting full snapshots. Expressions are compiled at probe initialization, evaluated at the configured ENTRY or EXIT phase, and serialized under the matching entry/return capture. They use snapshot budgets and are rejected when combined with full snapshots. Add focused tests for compilation, delivery filtering, evaluation errors, capture limits, rate limits, and the shared array merge helper.
5c76cd2 to
7cdb1b5
Compare
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.

Motivation
Add Capture Expressions support to the browser debugger so method probes can capture named expression results without enabling full snapshot capture.
Changes
captureExpressionsprobe parsing/compilation for browser debugger probes.ENTRYorEXIT) and serialize them undercaptures.entry.captureExpressionsorcaptures.return.captureExpressions.captureSnapshotwithcaptureExpressions.mergeArraysutility in browser-core for optional array merging.Test instructions
yarn test:unit --spec packages/browser-core/src/tools/utils/arrayUtils.spec.ts --spec packages/browser-debugger/src/domain/template.spec.ts --spec packages/browser-debugger/src/domain/probes.spec.ts --spec packages/browser-debugger/src/domain/api.spec.ts --spec packages/browser-debugger/src/domain/deliveryApi.spec.tsyarn typecheckChecklist