fix: report failed capture-expression evaluations instead of dropping#4043
Draft
p-datadog wants to merge 2 commits into
Draft
fix: report failed capture-expression evaluations instead of dropping#4043p-datadog wants to merge 2 commits into
p-datadog wants to merge 2 commits into
Conversation
A capture expression that fails to evaluate was silently discarded (ddog_evaluation_error_drop + continue), so the customer got no key and no error. Submit the evaluation-error snapshot instead, matching the metric-probe path and the other tracers, which surface failed capture expressions rather than omitting them.
Add tests/ext/live-debugger/debugger_capture_expression_error.phpt: a log probe with a capture expression that cannot evaluate (getmember on an int) now produces an evaluationErrors entry instead of no output.
Collaborator
|
@p-datadog Didn't we want to rate-limit this? |
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
When a capture expression fails to evaluate, we currently drop the error (
ddog_evaluation_error_drop(result.error); continue;indd_log_probe_add_capture_fields), so the customer sees neither a value nor any error signal. Every other tracer surfaces failed capture expressions, and our own metric-probe path already reports value-evaluation errors — this is the one spot that silently omits them.Change
Replace the drop with
dd_submit_probe_eval_error_snapshot(&def->parent.probe, result.error), the same call the metric-probe and template/condition paths use. The loop stillcontinues, so remaining expressions are unaffected.Test
tests/ext/live-debugger/debugger_capture_expression_error.phpt: a log probe whose capture expression cannot evaluate (getmember on an int) now emits anevaluationErrorsentry instead of producing no output. I couldn't run it locally (needs the dev-env request-replayer + built extension; the test SKIPIFs without a dev env) — relying on CI.Notes