Add Live Debugger lifetime event budgets#4510
Draft
watson wants to merge 1 commit intowatson/DEBUG-5296/make-limits-configurablefrom
Draft
Add Live Debugger lifetime event budgets#4510watson wants to merge 1 commit intowatson/DEBUG-5296/make-limits-configurablefrom
watson wants to merge 1 commit intowatson/DEBUG-5296/make-limits-configurablefrom
Conversation
Collaborator
Author
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5 tasks
Bundles Sizes Evolution
🚀 CPU PerformancePending... 🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 0744137 | Docs | Datadog PR Page | Give us feedback! |
1f6c9f0 to
e48232c
Compare
5d9fb49 to
d1fbe46
Compare
d179aeb to
a286fdd
Compare
16abcf5 to
74d9386
Compare
a286fdd to
4253889
Compare
Add configurable lifetime budgets for snapshot and non-snapshot probes, and auto-unregister probes once they exhaust their allowed sends.
4253889 to
b730634
Compare
74d9386 to
0744137
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 a circuit breaker so a single Live Debugger probe version cannot emit unbounded events over its lifetime.
Changes
Add new
DD_DEBUGGER.init()options to configure lifetime budgets for:Track emitted events per active probe version in the debugger runtime and automatically unregister probes once they exhaust their configured lifetime budget. Add unit tests covering snapshot and non-snapshot lifetime limits, skipping further collection after exhaustion, and resetting the budget when a new probe version is delivered.
Test instructions
yarn test:unit --spec packages/debugger/src/domain/api.spec.tspackages/debugger/src/entries/main.ts, verify thatDebuggerInitConfigurationexposes:maxSnapshotsPerProbeLifetimemaxNonSnapshotsPerProbeLifetimepackages/debugger/src/domain/probes.ts, verify that initialized probes track:eventsSentInLifetimelifetimeBudgetWarningEmittedpackages/debugger/src/domain/api.ts, verify that exhausted probes are removed after their final allowed send.Checklist