chore(debugger): implement Phase 1 guardrail foundations#18806
chore(debugger): implement Phase 1 guardrail foundations#18806P403n1x87 wants to merge 3 commits into
Conversation
Codeowners resolved as |
|
BenchmarksBenchmark execution time: 2026-06-30 12:28:34 Comparing candidate commit eed9ba0 in PR branch Found 0 performance improvements and 5 performance regressions! Performance is the same for 615 metrics, 10 unstable metrics. scenario:iast_aspects-re_search_aspect
scenario:iastaspects-strip_aspect
scenario:iastaspectsospath-ospathbasename_aspect
scenario:span-start
scenario:telemetryaddmetric-1-count-metric-1-times
|
Addresses the Phase 1 gaps from the Live Debugger Circuit-Breakers RFC: **Configurable time budgets** - Add `DD_DYNAMIC_INSTRUMENTATION_EVALUATION_TIMEOUT_MS` (default 10 ms) for condition and template expression evaluation wall-time budget - Add `DD_DYNAMIC_INSTRUMENTATION_CAPTURE_TIMEOUT_MS` (default 150 ms) to make the existing hardcoded 200 ms capture budget configurable - Register both keys in `supported-configurations.json` and regenerate `_supported_configurations.py` **Probe-entry skip on repeated evaluation errors** - Add `_error_throttled_until` timestamp to `ProbeConditionMixin`; when in the future, `_eval_condition` returns immediately without evaluating the condition - Evaluation overruns are treated as errors and fed into `condition_error_limiter` (same path as `DDExpressionEvaluationError`), so sustained slow conditions eventually trigger the same probe-entry skip as repeated runtime errors - Track `_eval_duration_ms` on `Signal` and `_capture_duration_ms` / `_template_eval_duration_ms` on `Snapshot` for observability **Canonical RFC metric names and reason codes (Appendix B)** - Replace old `skip` / `encoder.buffer.full` metrics with the canonical `dynamic_instrumentation.guardrails.*` namespace - `SKIP_RATE` split into `SKIP_RATE_GLOBAL` and `SKIP_RATE_PROBE` to map to `rateLimitGlobal` / `rateLimitProbe` reason codes - New skip reasons: `evaluationErrorThrottled`, `budgetExceededInvocation`, `queueFull` - New distribution metrics: `evaluation.duration` (condition / template) and `capture.duration` (with `truncated` tag) - Remove unused `_probe_type` helper and `_PROBE_TYPE_ATTR` constant from collector; inline `type(signal.probe).__name__` at call sites
eed9ba0 to
c6f0f64
Compare
emmettbutler
left a comment
There was a problem hiding this comment.
non-debugger changes look good
Circular import analysis
|
Description
Addresses the Phase 1 gaps from the Live Debugger Circuit-Breakers RFC:
Configurable time budgets
DD_DYNAMIC_INSTRUMENTATION_EVALUATION_TIMEOUT_MS(default 10 ms) for condition and template expression evaluation wall-time budgetDD_DYNAMIC_INSTRUMENTATION_CAPTURE_TIMEOUT_MS(default 150 ms) to make the existing hardcoded 200 ms capture budget configurablesupported-configurations.jsonand regenerate_supported_configurations.pyProbe-entry skip on repeated evaluation errors
_error_throttled_untiltimestamp toProbeConditionMixin; when in the future,_eval_conditionreturns immediately without evaluating the conditioncondition_error_limiter(same path asDDExpressionEvaluationError), so sustained slow conditions eventually trigger the same probe-entry skip as repeated runtime errors_eval_duration_msonSignaland_capture_duration_ms/_template_eval_duration_msonSnapshotfor observabilityCanonical RFC metric names and reason codes (Appendix B)
skip/encoder.buffer.fullmetrics with the canonicaldynamic_instrumentation.guardrails.*namespaceSKIP_RATEsplit intoSKIP_RATE_GLOBALandSKIP_RATE_PROBEto map torateLimitGlobal/rateLimitProbereason codesevaluationErrorThrottled,budgetExceededInvocation,queueFullevaluation.duration(condition / template) andcapture.duration(withtruncatedtag)_probe_typehelper and_PROBE_TYPE_ATTRconstant from collector; inlinetype(signal.probe).__name__at call sitesRefs: DEBUG-5460