Skip to content

Does this library work with sqlx? #7

@pavelnikolov

Description

@pavelnikolov

I tried using this library with sqlx, but I cannot get it working.
Any ideas how to solve this problem? My goal is to make instrumentedsql work with named queries.

My code
bebfore:

db, err := sqlx.Open("postgres", config.DB.URL)

after:

	sql.Register("instrumented-postgres", instrumentedsql.WrapDriver(&pq.Driver{}, instrumentedsql.WithTracer(opentracingsql.NewTracer())))
	db, err := sql.Open("instrumented-postgres", config.DB.URL)

Tracing works just fine, but now I get "pq: syntax error at end of input" errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions