Skip to content

[reference] R2DBC net-new instrumentation (io.r2dbc:r2dbc-spi 1.0.0)#12032

Draft
jordan-wong wants to merge 1 commit into
masterfrom
eval/r2dbc-net-new-20260721
Draft

[reference] R2DBC net-new instrumentation (io.r2dbc:r2dbc-spi 1.0.0)#12032
jordan-wong wants to merge 1 commit into
masterfrom
eval/r2dbc-net-new-20260721

Conversation

@jordan-wong

Copy link
Copy Markdown
Contributor

What

Reference PR from the apm-instrumentation-toolkit's net-new generation workflow, targeting io.r2dbc:r2dbc-spi:1.0.0.RELEASE. No dd-trace-java module exists for R2DBC today, so this was not a blind regen — there was nothing to hide/restore. This measures from-scratch generation quality against an SPI-only Maven coordinate (no concrete driver dependency).

Generated module: dd-java-agent/instrumentation/r2dbc/r2dbc-1.0/

Toolkit reviewer verdict: needs_work

The toolkit's own review_cycle ran 5 iterations and did not reach approved (todos_remaining=15 after iter5, the apparent iteration cap). Total cost: $65.81, duration: ~2h17m.

What went right (structural checks all clean):

  • Correct SPI-first targeting throughout (io.r2dbc.spi.Statement/Connection/Batch), no concrete-driver coupling
  • Correct single-name super("r2dbc"), no spurious version alias
  • Correctly classified as Cat A (span-creating); all Cat B checks correctly "not applicable"
  • No scheduler-exclusion, overload-selection, or context-store-hoisting issues

What's broken — real semantic-completeness gaps (dominant finding):

  • db.name (REQUIRED tag) is never set. ConnectionInstrumentation only extracts from ConnectionMetadata, which doesn't expose database/host/port/user. Root cause (per reviewer): should hook ConnectionFactory.create() or the Connection constructor instead, which exposes ConnectionFactoryOptions with that data.
  • peer.hostname, db.user, network.destination.port (RECOMMENDED tags) — all missing for the same reason.
  • Dead code: R2dbcConnectionInfo has fields (dbInstance, dbUser, dbHostname) defined but never populated.
  • BatchInstrumentation spans have zero connection metadata tags.
  • Test coverage gap mirrors the code gap; inconsistent db.type value between batch ("r2dbc") and statement ("testdb") tests.

Minor: 1 inline narrative comment to remove; missing explicit muzzle fail blocks for 0.8.x/0.9.x version families (defense-in-depth, not urgent — assertInverse=true already isolates).

This PR is left as-is (not iterated further) so the diff reflects exactly what the toolkit produced — do not fix findings on this branch; it's a research artifact, not a merge candidate.

CI Triage Status

Last updated: 2026-07-22

Confirmed research findings (do not fix):

  • (pending first CI run)

Fixed (config/mechanical):

  • (none yet)

Classified as flake / unrelated:

  • (none yet)

Still unclassified:

  • (pending first CI run)

🤖 Generated by apm-instrumentation-toolkit. Not a merge candidate — reference/research artifact only.

Reference PR from toolkit net-new generation (no prior dd-trace-java
module exists for R2DBC, so this is not a blind regen). Generated
against io.r2dbc:r2dbc-spi:1.0.0.RELEASE.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jordan-wong jordan-wong added tag: ai generated Largely based on code generated by an AI or LLM tag: apm integration toolkit Changes generated by DataDog/apm-instrumentation-toolkit as part of IDM AIT experimentation labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tag: ai generated Largely based on code generated by an AI or LLM tag: apm integration toolkit Changes generated by DataDog/apm-instrumentation-toolkit as part of IDM AIT experimentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant