Skip to content

Conversation

@onkar-dream11
Copy link
Contributor

What Does This Do

This PR adds support for automatic tracing of PostgreSQL queries when using the Vert.x PostgreSQL Client in a Vert.x 4 application, enabling Datadog APM to capture query execution times and database interactions.

Motivation

Datadog APM currently doesn't automatically trace PostgreSQL queries executed via the Vert.x PostgreSQL Client, leading to a lack of visibility into database operations. This fix addresses that gap.

Additional Notes

The PR ensures that PostgreSQL queries are automatically instrumented and visible in Datadog APM.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@onkar-dream11 onkar-dream11 marked this pull request as draft February 26, 2025 17:25
@onkar-dream11 onkar-dream11 marked this pull request as ready for review February 26, 2025 17:26
@onkar-dream11 onkar-dream11 reopened this Feb 27, 2025
@onkar-dream11 onkar-dream11 changed the title added vertx postgresql client instrumentation Add vertx postgresql client instrumentation Feb 27, 2025
@onkar-dream11 onkar-dream11 marked this pull request as draft February 28, 2025 05:08
@onkar-dream11
Copy link
Contributor Author

@PerfectSlayer @gary-huang can you please help me identify why the checks are failing??

@PerfectSlayer
Copy link
Contributor

Hello @onkar-dream11 👋 First, thanks for you contribution.
The tests will be failing as they are missing credentials as you are not part of the Datadog GitHub organisation.
I will reach the integration team to follow up with your submission.

@PerfectSlayer PerfectSlayer added tag: community Community contribution type: enhancement Enhancements and improvements inst: vertx Eclipse Vert.x instrumentation labels Feb 28, 2025
@vandonr vandonr linked an issue Feb 28, 2025 that may be closed by this pull request
Copy link
Contributor

@vandonr vandonr left a comment

Choose a reason for hiding this comment

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

looks ok, but most of the code has been duplicated compared to the existing mysql integration. I think it'd be better to have only the Pg* classes in this package, do the same for mysql, and put the common code in a vertex-sql-common to avoid that.
I can let you do it, or I can take your commits in a branch I own and do it if you prefer.

@onkar-dream11
Copy link
Contributor Author

@vandonr I have resolved the given comments, and regarding common code I thought of it having in vertx-sql-common to avoid duplication, like with MySQL. However, I kept it separate for now because I thought test cases might fail when writing between modules. Could you take my commit and make the changes?

@vandonr
Copy link
Contributor

vandonr commented Feb 28, 2025

TIL I can push to a branch on a fork

@vandonr
Copy link
Contributor

vandonr commented Feb 28, 2025

OK I think I may need to push on my own branch anyway for the CI to run properly

@vandonr
Copy link
Contributor

vandonr commented Feb 28, 2025

closing in favor of #8471

@vandonr vandonr closed this Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: vertx Eclipse Vert.x instrumentation tag: community Community contribution type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No instrumentation support for Vert.x postgresql client

3 participants