Skip to content

Add Vert.x SQL batch size attribute#19004

Merged
laurit merged 2 commits into
open-telemetry:mainfrom
trask:vertx-batch
Jun 16, 2026
Merged

Add Vert.x SQL batch size attribute#19004
laurit merged 2 commits into
open-telemetry:mainfrom
trask:vertx-batch

Conversation

@trask

@trask trask commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • capture Vert.x SQL executeBatchQuery batch sizes for stable DB semconv

Copilot AI 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.

Pull request overview

This PR enhances the Vert.x SQL client javaagent instrumentation to capture SQL batch sizes and reflect batch operations in stable database semantic conventions (including span naming and db.operation.batch_size).

Changes:

  • Added an optional operationBatchSize field to VertxSqlClientRequest and exposed it via a getter.
  • Captured batch sizes in Vert.x QueryExecutor advice for executeBatchQuery and surfaced the value via SqlClientAttributesGetter#getDbOperationBatchSize.
  • Updated Vert.x SQL client tests (4.0 and 5.0) to assert stable-semconv batch span naming and the db.operation.batch_size attribute.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
instrumentation/vertx/vertx-sql-client/vertx-sql-client-common-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/common/v4_0/VertxSqlClientRequest.java Adds nullable batch size to the request model used by the DB attributes extractor.
instrumentation/vertx/vertx-sql-client/vertx-sql-client-common-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/common/v4_0/VertxSqlClientAttributesGetter.java Exposes batch size to the semconv DB attributes extraction via the getter interface.
instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/v5_0/QueryExecutorInstrumentation.java Detects executeBatchQuery calls and captures the batch Collection size into the request.
instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/v4_0/QueryExecutorInstrumentation.java Same as 5.0 variant: captures batch size for executeBatchQuery.
instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/v5_0/VertxSqlClientTest.java Updates expectations for stable semconv batch naming and db.operation.batch_size.
instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/v4_0/VertxSqlClientTest.java Updates expectations for stable semconv batch naming and db.operation.batch_size.

@trask trask marked this pull request as ready for review June 15, 2026 21:16
@trask trask requested a review from a team as a code owner June 15, 2026 21:16
@laurit laurit merged commit bca0d42 into open-telemetry:main Jun 16, 2026
182 of 184 checks passed
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.

3 participants