opentracing-contrib / java-jdbc

OpenTracing Instrumentation for JDBC
Apache License 2.0
82 stars 56 forks source link

URLParser unable to handle replication keyword #84

Closed janfreymann closed 4 years ago

janfreymann commented 4 years ago

Hi,

first of all, thanks for the great implementation of Jaeger integration for Spring Boot. It is very easy to integrate and useful for our project.

I noticed for one Spring Boot based service that connects to a cluster of database instances that the URLParser of Jdbc is not able to handle the following JDBC URL format:

jdbc:mysql:replication://primary.db:3306,replica.db:3306/database

If the :replicationpart of the URL is omitted, the tag peer.address is set correctly, if not, it has a value like **internally_generated**1598275417336**:3306, which messes up the System Architecture view in the Jaeger frontend because the peer address is not unique any more (the number 1598... is a timestamp).

Is it possible to fix the parser or somehow override the peer.address or ConnectionInfo data from the application?

malafeev commented 4 years ago

PR is welcome

janfreymann commented 4 years ago

Hi, when trying to create a PR, I noticed that the issue is not with the URLParser, but rather with the underlying Hikari Pool. When the ConnectionInfo asks for the URL, it gets the **internally_generated**1598275417336** bit directly from the Hikari proxy connection, so nothing to to about it here.

So I think we can close the issue here...