Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for informix connection string parsing in jdbc instrumentation #11542

Merged
merged 10 commits into from
Jun 12, 2024

Conversation

jaydeluca
Copy link
Member

When I was converting the JDBC tests from groovy to java I noticed that there was an old TODO around instrumenting informix connection strings, with the test cases commented out.

I took a stab at closing this gap in the event we still would like to have this coverage. I admittedly don't have any experience with informix databases, but I searched for example connection strings across github and referenced these docs.

I added a default port value of 9098 after finding a few references to that online, although I wasn't able to find concrete documentation to validate it.

Here are the sources i did find, for reference:

I can remove the default port if that's not enough to go on

@jaydeluca jaydeluca requested a review from a team as a code owner June 8, 2024 12:36
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Jun 8, 2024
Comment on lines 871 to 872
builder = INFORMIX.doParse(jdbcUrl, builder);
builder.host(DEFAULT_HOST);
Copy link
Contributor

Choose a reason for hiding this comment

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

To me this is strange. Looking at https://www.ibm.com/docs/en/informix-servers/12.10?topic=method-format-database-urls before informix-direct it says

For connections on the database server, use the following format:

Does this mean that informix-direct is used when the server is connecting to somewhere? If that is the case should we bother with it at all? Considering that it is difficult to find info about informix-direct it might be the best option. There doesn't seem to be a host and port for informix-direct, if we are going to parse this then imo we should not fill these at all (could skip MODIFIED_URL_LIKE.doParse and INFORMIX.doParse calls).

@trask trask merged commit 687cffe into open-telemetry:main Jun 12, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test native This label can be applied to PRs to trigger them to run native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants