Skip to content

Fix error spam from filtered out log probes - #12207

Open
tylfin wants to merge 2 commits into
masterfrom
tyler.finethy/IDEAI-714
Open

Fix error spam from filtered out log probes#12207
tylfin wants to merge 2 commits into
masterfrom
tyler.finethy/IDEAI-714

Conversation

@tylfin

@tylfin tylfin commented Aug 13, 2026

Copy link
Copy Markdown
Member

What Does This Do

Avoids evaluating a log probe’s capture expressions when we already know the hit won’t be sent. This includes hits rejected by the probe condition, dropped by rate limiting, or from a disabled debug session.

Motivation

Previously, capture expressions were evaluated on every probe hit, even when the probe condition failed. Since those captured values were never used, this was unnecessary work.

There was also a more serious issue when a capture expression failed to evaluate. The failure generated a debugger error event, but that event bypassed sampling. The sampler only runs when the probe condition passes or the condition itself fails, so these events kept the default "sampled" status.

As a result, none of the normal limits applied: the per-probe rate limit, the 1 error/second limit, or the global rate limit.

Additional Notes

Reproduced by a new system test, which sends 5 filtered out hits at more than 1s apart and requires at most 1 event.

Contributor Checklist

Jira ticket: IDEAI-714

A log probe with a condition that rejects a hit no longer evaluates its
capture expressions on that hit. Those captures are dropped before being
sent, so evaluating them served no purpose, and any evaluation failure
was reported as a debugger event for every single hit, with no rate
limiting applied. A probe with a broken capture expression on a hot
method could therefore flood the debugger UI with error events.

Capture expressions are also skipped when the hit is rate limited, which
matches how the log message is handled.
@tylfin tylfin added type: bug fix Bug fix comp: debugger Dynamic Instrumentation labels Aug 13, 2026
@tylfin
tylfin marked this pull request as ready for review August 13, 2026 17:43
@tylfin
tylfin requested a review from a team as a code owner August 13, 2026 17:43
@tylfin
tylfin requested review from ojung and removed request for a team August 13, 2026 17:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fec98ea077

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 74.41% (+16.07%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 44df0ec | Docs | Datadog PR Page | Give us feedback!

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The new guard matches snapshot commit semantics: rejected or rate-limited hits cannot contribute capture values, while accepted sampled hits still evaluate them and condition-evaluation errors remain reportable through the existing error path.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit fec98ea · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Gate capture expression evaluation on the effective send decision
(LogStatus.shouldSend()) instead of the raw sampling flag, so probes
in an active debug session keep their capture expressions when their
own sampler rejects the hit.
@dd-octo-sts

dd-octo-sts Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.80 s 14.70 s [-0.1%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 13.63 s 13.71 s [-1.4%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 17.46 s 17.30 s [+0.1%; +1.8%] (maybe worse)
startup:petclinic:iast:Agent 17.41 s 17.55 s [-1.5%; -0.1%] (maybe better)
startup:petclinic:profiling:Agent 17.41 s 17.30 s [-0.5%; +1.7%] (no difference)
startup:petclinic:sca:Agent 17.43 s 17.39 s [-0.9%; +1.4%] (no difference)
startup:petclinic:tracing:Agent 16.56 s 16.66 s [-1.5%; +0.4%] (no difference)

Commit: 44df0ecf · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant