Skip to content

Propagate Oracle dynamic service hash without SQL comments - #12234

Draft
joelmarcotte wants to merge 1 commit into
masterfrom
joel.marcotte/sdbm-2904-oracle-action-propagation
Draft

Propagate Oracle dynamic service hash without SQL comments#12234
joelmarcotte wants to merge 1 commit into
masterfrom
joel.marcotte/sdbm-2904-oracle-action-propagation

Conversation

@joelmarcotte

@joelmarcotte joelmarcotte commented Aug 18, 2026

Copy link
Copy Markdown

What changed

  • Add opt-in DD_DBM_PROPAGATION_ORACLE_ACTION_ENABLED configuration. It defaults to false.
  • With DD_DBM_PROPAGATION_MODE=dynamic_service, write _DD_DDSH:<BaseHash> through setClientInfo("OCSID.ACTION", ...) for Oracle connections.
  • Suppress Oracle SQL-comment injection in that opt-in mode, including prepared-statement preparation.
  • Track the last attempted ACTION per physical connection. Set it once for a stable hash and refresh it only if the base hash changes.
  • Keep parsed URL metadata cached while cloning it before connection attachment so connection-local ACTION state cannot leak between connections with the same URL.
  • Preserve full mode, service mode, and dynamic-service SQL comments for other databases.

Why

SDBM-2904 requires Oracle DBM/APM correlation without changing statement text. Oracle SQL Plan Management matches exact SQL text, so injected comments can prevent stored baselines from matching.

The ACTION payload uses the same signed BaseHash already emitted as ddsh, so the backend can reuse the existing dynamic-service linker.

Enablement

DD_DBM_PROPAGATION_MODE=dynamic_service
DD_DBM_PROPAGATION_ORACLE_ACTION_ENABLED=true

Verification

  • ./gradlew :dd-trace-api:spotlessApply :internal-api:spotlessApply :dd-java-agent:agent-bootstrap:spotlessApply :dd-java-agent:instrumentation:jdbc:spotlessApply
  • ./gradlew :internal-api:test --tests 'datadog.trace.api.ConfigTest.Oracle DBM action propagation enabled*'
  • ./gradlew :dd-java-agent:instrumentation:jdbc:forkedTest --tests 'OracleInjectionForkedTest' --tests 'OracleDynamicServiceActionInjectionForkedTest' --tests 'DBMDynamicServiceInjectionForkedTest'

Links

@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Aug 18, 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.03 s 13.94 s [-0.1%; +1.3%] (no difference)
startup:insecure-bank:tracing:Agent 12.97 s 12.95 s [-0.7%; +1.1%] (no difference)
startup:petclinic:appsec:Agent 17.40 s 16.83 s [-1.2%; +7.9%] (no difference)
startup:petclinic:iast:Agent 17.42 s 17.47 s [-1.3%; +0.7%] (no difference)
startup:petclinic:profiling:Agent 17.42 s 17.35 s [-0.7%; +1.4%] (no difference)
startup:petclinic:sca:Agent 17.44 s 17.28 s [+0.1%; +1.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.56 s 16.75 s [-2.3%; -0.1%] (maybe better)

Commit: 10354441 · 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant