-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
The hooks get entered twice for each sql query because from my understanding, the first hit to the hook get cancelled because of driver.ErrSkip "driver: skip fast-path; continue as if unimplemented" It seems to happen with sqlx.
More details is in the discussion over at data-dog DataDog/dd-trace-go#270
Right now a quick fix would be checking for driver.ErrSkip and ignore it in every execs and query
results, err := conn.execContext(ctx, query, args)
- if err != nil {
+ if err != nil && err != driver.ErrSkip {
return results, handlerErr(ctx, conn.hooks, err, query, list...)
}The other fix (from the thread) is to set interpolateParams=true is the database dsn.
Metadata
Metadata
Assignees
Labels
No labels