-
Notifications
You must be signed in to change notification settings - Fork 858
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
Conversation
...ry/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcConnectionUrlParser.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcConnectionUrlParser.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcConnectionUrlParser.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcConnectionUrlParser.java
Outdated
Show resolved
Hide resolved
builder = INFORMIX.doParse(jdbcUrl, builder); | ||
builder.host(DEFAULT_HOST); |
There was a problem hiding this comment.
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).
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