-
-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The function instrumentDriver() registers a custom SQL driver with sql.Register() and it uses a decorated driver name as something like instrumented-sql-driver-sqlite3 which is based on the driver name but actually it used wrapper options per connection. So if there are two or more connections with the same driver, only one wrapped driver will be registered with the wrapper option of the first successful connection.
The purpose of the wrapped driver is to support logging, tracing, etc. and those actions can be applied to each connection with different settings.
pop/connection_instrumented.go
Line 17 in d146f1b
| func instrumentDriver(deets *ConnectionDetails, defaultDriverName string) (driverName, dialect string, err error) { |
See this and the following comments for more details.
Related Issues or PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working