opentracing-contrib / java-jdbc

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

Fix database name parsing when a path URL query params contains a path #108

Closed rnorth closed 3 years ago

rnorth commented 3 years ago

Postgres allows the path to certificates to be specified among the URL query params, e.g. jdbc:postgresql://host:port/dbname?sslmode=verify-full&sslrootcert=/some/path.pem. Prior to this fix, the db.instance tag would be set to path.pem instead of dbname.

This change counts slashes from the left, rather than the right, when detecting the DB name.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 338


Totals Coverage Status
Change from base Build 337: 0.1%
Covered Lines: 515
Relevant Lines: 1016

💛 - Coveralls