Skip to content

Make Live Debugger per-second budgets configurable#4509

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
watson/DEBUG-5296/make-limits-configurable
May 12, 2026
Merged

Make Live Debugger per-second budgets configurable#4509
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
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

@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 169.36 KiB 169.36 KiB 0 B 0.00%
Rum Profiler 5.97 KiB 5.97 KiB 0 B 0.00%
Rum Recorder 21.23 KiB 21.23 KiB 0 B 0.00%
Logs 54.70 KiB 54.70 KiB 0 B 0.00%
Rum Slim 127.69 KiB 127.69 KiB 0 B 0.00%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0026 0.0021 -19.23%
RUM - add action 0.0127 0.0146 +14.96%
RUM - add error 0.0166 0.0122 -26.51%
RUM - add timing 0.0006 0.0008 +33.33%
RUM - start view 0.0144 0.0152 +5.56%
RUM - start/stop session replay recording 0.0012 0.0012 0.00%
Logs - log message 0.0268 0.0223 -16.79%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 38.44 KiB 38.91 KiB +479 B
RUM - add action 69.11 KiB 68.68 KiB -440 B
RUM - add timing 36.85 KiB 37.64 KiB +811 B
RUM - add error 69.34 KiB 69.21 KiB -132 B
RUM - start/stop session replay recording 41.08 KiB 41.36 KiB +294 B
RUM - start view 484.32 KiB 488.17 KiB +3.85 KiB
Logs - log message 54.85 KiB 63.72 KiB +8.87 KiB

🔗 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: 77.06% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2057d22 | 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
@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
@watson watson changed the base branch from watson/DEBUG-5296/add-live-debugger to graphite-base/4509 May 7, 2026 05:31
@watson watson force-pushed the graphite-base/4509 branch from 8130067 to e739e7e Compare May 12, 2026 11:07
@watson watson force-pushed the watson/DEBUG-5296/make-limits-configurable branch from b730634 to d43971b Compare May 12, 2026 11:07
@watson watson changed the base branch from graphite-base/4509 to main May 12, 2026 11:07
@watson watson marked this pull request as ready for review May 12, 2026 11:07
@watson watson requested review from a team as code owners May 12, 2026 11:07
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 d43971b to 2057d22 Compare May 12, 2026 14:15
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit a140b07 into main May 12, 2026
25 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the watson/DEBUG-5296/make-limits-configurable branch May 12, 2026 14:59
@github-actions github-actions Bot locked and limited conversation to collaborators May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants