Repository navigation
Conversation
Pools validate connections with a test query such as SELECT 1 FROM DUAL, on borrow, on return and from keepalive timers. Each check produced a JDBC span: a child span inside application traces when validating on borrow, and a standalone root trace when validating in the background. Run HikariCP, DBCP2 (standalone and Tomcat-bundled), Tomcat JDBC and c3p0 validation under a black-hole span, so the checks create no spans and inject no DBM trace context. Tomcat's init SQL runs through the same validate method and stays traced. The integration is on by default and can be turned off with DD_TRACE_JDBC_POOL_VALIDATION_ENABLED=false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The validation query calls a counting H2 function, so each case also proves the pool really validated during the traced borrow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setContextInfo unboxed forceSamplingDecision() without a null check. Under a black-hole span, such as a muted pool validation or @DoNotTrace, the decision is null, so it threw an NPE. The catch logged a misleading DBM warning and used up the once-only injection warning, hiding any later real injection failure. Return before the round trip when there is no sampling decision, as the Oracle action and SQL comment paths already do. Traced queries are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the local runUnderTrace with TraceUtils.runUnderTrace, and say why the warm-up sleep is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
More details
Validation suppression restores the previous scope on exceptional exits and leaves Tomcat initialization SQL traced. The specialist’s completed static review identified no actionable defects.
🤖 Bits Code Review · Commit c006385
What Does This Do
Connection pool liveness checks (
SELECT 1 FROM DUAL,Connection.isValid) no longer create spans. This covers HikariCP, DBCP2 (standalone and Tomcat-bundled), Tomcat JDBC and c3p0, on borrow, on return and from keepalive timers.It is on by default.
DD_TRACE_JDBC_POOL_VALIDATION_ENABLED=falserestores the previous behavior.It also fixes a SQL Server DBM
full-mode bug that this change made reachable on every borrow:setContextInfounboxed a null sampling decision under muted tracing, threw an NPE, and the catch used up the once-only DBM injection warning. That would have hidden any later real injection failure.Motivation
Customers hitting ingestion overages show large volumes of pool validation queries. In one case they were ~800k requests among the top Oracle resources. Checks that run on a background thread become standalone root traces. Checks on borrow add a child span to every request that reuses an idle connection. Nobody gets value from these spans, and they are cheap to stop at the source rather than filtering them later.
Additional Notes
service/fullmodes the validation SQL still gets the service-level comment, so DBM can still attribute the query to the service; only the span link is gone.initSQLthroughvalidate(VALIDATE_INIT), so that action stays traced, along with the test-on-connect check that shares it.context_info, Oracle action, Postgresapplication_name) persists on the connection. A muted query skips the write, so DBM may associate it with the previous request's context. That behavior already exists under@DoNotTrace; this change doesn't make it worse, but it's worth a DBM opinion.DataSourceHealthIndicator).Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue🤖 Generated with Claude Code