Skip to content

Improve Vert.x SQL stable metric tests#19010

Merged
laurit merged 1 commit into
open-telemetry:mainfrom
trask:fix-vertx-sql-stable-metric-tests
Jun 16, 2026
Merged

Improve Vert.x SQL stable metric tests#19010
laurit merged 1 commit into
open-telemetry:mainfrom
trask:fix-vertx-sql-stable-metric-tests

Conversation

@trask

@trask trask commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • use the shared DB duration metric helper in the Vert.x SQL 4.0 and 5.0 stable semconv tests
  • assert the stable metric unit, description, histogram points, and expected attribute keys instead of checking only the metric name

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 strengthens the Vert.x SQL client stable semantic convention (stable semconv) metric tests by switching to the shared DB client duration metric assertion helper and validating metric metadata and attribute keys (not just metric name).

Changes:

  • Replace ad-hoc waitAndAssertMetrics(... hasName("db.client.operation.duration")) checks with DbClientMetricsTestUtil.assertDurationMetric(...).
  • Assert stable metric unit (s), description, histogram structure, and that histogram point attributes contain only the expected semantic convention keys.

Reviewed changes

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

File Description
instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/v5_0/VertxSqlClientTest.java Use shared duration-metric helper and assert expected stable metric metadata + attribute keys.
instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/sqlclient/v4_0/VertxSqlClientTest.java Use shared duration-metric helper and assert expected stable metric metadata + attribute keys.

@trask trask marked this pull request as ready for review June 15, 2026 23:16
@trask trask requested a review from a team as a code owner June 15, 2026 23:16
@laurit laurit merged commit c4d01f7 into open-telemetry:main Jun 16, 2026
95 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