Skip to content

Add safe Live Debugger file extension filtering - #506

Open
watson wants to merge 1 commit into
masterfrom
watson/DEBUG-6161/file-extension-filtering
Open

Add safe Live Debugger file extension filtering#506
watson wants to merge 1 commit into
masterfrom
watson/DEBUG-6161/file-extension-filtering

Conversation

@watson

@watson watson commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What and why?

A broad liveDebugger.include glob can currently select CSS and other files that should not be instrumented. Add an independent file-extension guard so path selection remains flexible without becoming a parsing footgun.

Tracks DEBUG-6161.

How?

  • Add a case-insensitive fileExtensions option with standard JavaScript and TypeScript defaults and an explicit all escape hatch.
  • Normalize and deduplicate configured extensions and reject empty or malformed arrays.
  • Use consistent glob matching for native and child-compilation filtering.
  • Document the behavior and cover default, custom, glob, query-suffixed, and validation cases.

Verification

  • yarn test:unit packages/plugins/live-debugger
  • yarn workspace @dd/live-debugger-plugin typecheck
  • yarn cli integrity

@watson
watson requested review from a team as code owners September 5, 2026 09:05
@watson
watson requested review from aghiles-dd and removed request for a team September 5, 2026 09:05
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tests

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 26dedb7 | Docs | View more details | Give us feedback!

Co-authored-by: Cursor <cursoragent@cursor.com>
@watson
watson force-pushed the watson/DEBUG-6161/file-extension-filtering branch from 51a760c to 26dedb7 Compare September 5, 2026 09:09
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Live Debugger Runtime Benchmark

SDK-loaded dormant-probe runtime overhead, measured against an uninstrumented bundle in the same browser session.

Browser Debugger SDK: 7.12.0 · built 2026-09-03 · S3 ETag 59df9831

Browser Workload Quality Per-call overhead upper
chrome Hot clean <= 2.55 ns
chrome Tiny clean <= 0.04 ns
firefox Hot clean <= 9.54 ns
firefox Tiny clean <= 0.01 ns
safari Hot clean <= 5.69 ns
safari Tiny clean <= 1.05 ns
Full diagnostics
browser  workload  quality  per-call overhead upper  overhead upper         95% CI        A/A diag       block CI  acf(1)   baseline  instrumented                         samples
-------  --------  -------  -----------------------  --------------  -------------  --------------  -------------  ------  ---------  ------------  ------------------------------
chrome   Hot       clean                 <= 2.55 ns        <= 5.14%  2.52..2.55 ns  -0.01..0.01 ns  2.53..2.55 ns    0.07  52.635 ms     55.310 ms   102 (trim 20%, outliers 8.8%)
chrome   Tiny      clean                 <= 0.04 ns        <= 0.53%  0.01..0.04 ns  -0.01..0.01 ns  0.01..0.04 ns    0.15  59.760 ms     59.965 ms  102 (trim 20%, outliers 14.7%)
firefox  Hot       clean                 <= 9.54 ns       <= 38.00%  9.52..9.54 ns  -0.00..0.01 ns  9.52..9.54 ns    0.11  39.840 ms     54.980 ms   102 (trim 20%, outliers 5.9%)
firefox  Tiny      clean                 <= 0.01 ns        <= 0.06%  0.00..0.01 ns  -0.00..0.00 ns  0.00..0.01 ns   -0.10  50.340 ms     50.360 ms   102 (trim 20%, outliers 8.8%)
safari   Hot       clean                 <= 5.69 ns       <= 22.65%  5.68..5.69 ns  -0.01..0.00 ns  5.68..5.69 ns   -0.00  45.140 ms     55.360 ms   102 (trim 20%, outliers 4.9%)
safari   Tiny      clean                 <= 1.05 ns       <= 28.22%  1.05..1.05 ns  -0.00..0.00 ns  1.05..1.05 ns   -0.02  41.100 ms     52.660 ms   102 (trim 20%, outliers 5.9%)

Raw samples are in the live-debugger-runtime-bench-results artifact.

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