Skip to content

Make Live Debugger per-second budgets configurable#4509

Draft
watson wants to merge 1 commit intowatson/DEBUG-5296/add-live-debuggerfrom
watson/DEBUG-5296/make-limits-configurable
Draft

Make Live Debugger per-second budgets configurable#4509
watson wants to merge 1 commit intowatson/DEBUG-5296/add-live-debuggerfrom
watson/DEBUG-5296/make-limits-configurable

Conversation

@watson
Copy link
Copy Markdown
Collaborator

@watson watson commented Apr 21, 2026

Motivation

Allow Live Debugger users to tune per-second backpressure limits without changing the runtime defaults.

Changes

Add new DD_DEBUGGER.init() options to configure:

  • the global snapshot per-second budget
  • the default snapshot per-probe per-second budget
  • the default non-snapshot per-probe per-second budget

Wire those options into the debugger probe budget logic and reset them when the debugger transport is reset. Add unit tests covering the configurable global snapshot limit and configurable per-probe snapshot/non-snapshot limits.

Test instructions

  1. Run yarn test:unit --spec packages/debugger/src/domain/api.spec.ts
  2. Run yarn test:unit --spec packages/debugger/src/domain/probes.spec.ts
  3. In packages/debugger/src/entries/main.ts, verify that DebuggerInitConfiguration exposes:
    • maxSnapshotsPerSecondGlobally
    • maxSnapshotsPerSecondPerProbe
    • maxNonSnapshotsPerSecondPerProbe
  4. In packages/debugger/src/domain/probes.ts, verify those values are used as the runtime defaults when probe-specific sampling is not set.

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

Copy link
Copy Markdown
Collaborator Author

watson commented Apr 21, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Apr 21, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 179.42 KiB 179.42 KiB 0 B 0.00%
Rum Profiler 6.16 KiB 6.16 KiB 0 B 0.00%
Rum Recorder 27.03 KiB 27.03 KiB 0 B 0.00%
Logs 56.80 KiB 56.80 KiB 0 B 0.00%
Rum Slim 135.26 KiB 135.26 KiB 0 B 0.00%
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.00545 0.0039 -28.44%
RUM - add action 0.0161 0.013 -19.25%
RUM - add error 0.013999999999999999 0.0121 -13.57%
RUM - add timing 0.00295 0.0025 -15.25%
RUM - start view 0.01405 0.0118 -16.01%
RUM - start/stop session replay recording 0.0009 0.0007 -22.22%
Logs - log message 0.016900000000000002 0.0141 -16.57%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 31.53 KiB 32.37 KiB +859 B
RUM - add action 101.84 KiB 116.65 KiB +14.80 KiB
RUM - add timing 32.46 KiB 32.04 KiB -431 B
RUM - add error 104.34 KiB 96.70 KiB -7.64 KiB
RUM - start/stop session replay recording 32.01 KiB 31.45 KiB -563 B
RUM - start view 489.22 KiB 497.90 KiB +8.69 KiB
Logs - log message 99.21 KiB 99.16 KiB -48 B

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Apr 21, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 80.00%
Overall Coverage: 76.68% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b730634 | Docs | Datadog PR Page | Give us feedback!

@watson watson force-pushed the watson/DEBUG-5296/add-live-debugger branch from bf9a162 to b9da4f3 Compare April 21, 2026 07:36
@watson watson force-pushed the watson/DEBUG-5296/make-limits-configurable branch from 1f6c9f0 to e48232c Compare April 21, 2026 07:36
@watson watson force-pushed the watson/DEBUG-5296/add-live-debugger branch from b9da4f3 to 0040ee8 Compare April 21, 2026 08:17
@watson watson force-pushed the watson/DEBUG-5296/make-limits-configurable branch 2 times, most recently from d179aeb to a286fdd Compare April 21, 2026 09:13
@watson watson force-pushed the watson/DEBUG-5296/add-live-debugger branch from 0040ee8 to 653aee9 Compare April 21, 2026 09:13
@watson watson changed the base branch from watson/DEBUG-5296/add-live-debugger to graphite-base/4509 April 22, 2026 12:24
@watson watson force-pushed the graphite-base/4509 branch from 653aee9 to 7d1efe7 Compare April 22, 2026 21:03
@watson watson force-pushed the watson/DEBUG-5296/make-limits-configurable branch from a286fdd to 4253889 Compare April 22, 2026 21:03
@watson watson changed the base branch from graphite-base/4509 to watson/DEBUG-5296/add-live-debugger April 22, 2026 21:03
@watson watson changed the base branch from watson/DEBUG-5296/add-live-debugger to graphite-base/4509 April 23, 2026 10:42
Allow the browser debugger to configure global snapshot and per-probe sampling limits
through init options so teams can tune backpressure without changing the runtime.
@watson watson force-pushed the watson/DEBUG-5296/make-limits-configurable branch from 4253889 to b730634 Compare April 23, 2026 10:59
@watson watson changed the base branch from graphite-base/4509 to watson/DEBUG-5296/add-live-debugger April 23, 2026 10:59
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