Skip to content

Fix IAST JDBC instrumentation when getMetadata throws non-SQLException#11420

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
smola/gentle-parsedbinfo
Jun 12, 2026
Merged

Fix IAST JDBC instrumentation when getMetadata throws non-SQLException#11420
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
smola/gentle-parsedbinfo

Conversation

@smola

@smola smola commented May 19, 2026

Copy link
Copy Markdown
Member

What Does This Do

  • Make JDBCDecorator handle non-SQLException exception from connection.getMetadata(), and handle it like any other exception.

Motivation

  • We see this method throwing internal exceptions in IAST (seen via telemetry, no app impact), because the connection pool implementation intentionally throws errors that do not extend from SQLException.

Additional Notes

  • Database monitoring was not affected, as it had an outer catch for Throwable.
  • For IAST, there was no impact to application behavior (there's a catch-all for exceptions in IAST), but this inhibited IAST sinks for beforePrepare.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@smola smola added type: bug fix Bug fix inst: jdbc JDBC instrumentation comp: database Database Monitoring labels May 19, 2026
@datadog-datadog-prod-us1

This comment has been minimized.

@smola smola added comp: asm iast Application Security Management (IAST) and removed comp: database Database Monitoring labels May 20, 2026
@smola smola changed the title fix(jdbc): catch any throwable when getting JDBC getMetadata Fix IAST JDBC instrumentation when getMetadata throws non-SQLException May 20, 2026
@smola smola added the tag: ai generated Largely based on code generated by an AI or LLM label May 20, 2026
@smola
smola force-pushed the smola/gentle-parsedbinfo branch from 362658e to 6a51445 Compare May 20, 2026 08:10
@smola
smola marked this pull request as ready for review May 20, 2026 08:11
@smola
smola requested review from a team as code owners May 20, 2026 08:11
@smola
smola requested review from dromanol, jandro996 and jordan-wong and removed request for a team May 20, 2026 08:11

@jandro996 jandro996 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks for catch this :)

@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: 6a51445772

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dd-octo-sts

dd-octo-sts Bot commented Jun 4, 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 13.90 s 13.94 s [-1.0%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.97 s 12.89 s [-0.2%; +1.3%] (no difference)
startup:petclinic:appsec:Agent 16.84 s 16.76 s [-0.4%; +1.4%] (no difference)
startup:petclinic:iast:Agent 16.84 s 16.95 s [-1.6%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 16.59 s 16.84 s [-2.4%; -0.5%] (maybe better)
startup:petclinic:sca:Agent 16.87 s 16.06 s [+0.7%; +9.4%] (maybe worse)
startup:petclinic:tracing:Agent 16.02 s 15.99 s [-0.8%; +1.2%] (no difference)

Commit: 7b488215 · 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.

@smola

smola commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jun 12, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-12 09:03:46 UTC ℹ️ Start processing command /merge


2026-06-12 09:03:52 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-06-12 10:34:07 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 0121ec8 into master Jun 12, 2026
573 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the smola/gentle-parsedbinfo branch June 12, 2026 10:34
@github-actions github-actions Bot added this to the 1.64.0 milestone Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: asm iast Application Security Management (IAST) inst: jdbc JDBC instrumentation tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants