Skip to content

Make Live Debugger per-second budgets configurable#4509

Open
watson wants to merge 1 commit into
mainfrom
watson/DEBUG-5296/make-limits-configurable
Open

Make Live Debugger per-second budgets configurable#4509
watson wants to merge 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 179.56 KiB 179.56 KiB 0 B 0.00%
Rum Profiler 6.04 KiB 6.04 KiB 0 B 0.00%
Rum Recorder 27.03 KiB 27.03 KiB 0 B 0.00%
Logs 56.69 KiB 56.69 KiB 0 B 0.00%
Rum Slim 135.41 KiB 135.41 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance

Pending...

🧠 Memory Performance

Pending...

🔗 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.70% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d43971b | 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
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 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
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