Skip to content

OTEL tracing support #1176

Open
Open
@NickBelhomme

Description

@NickBelhomme

Is your feature request related to a problem? Please describe.
We are using pgx/v5: https://github.com/golang-migrate/migrate/tree/master/database/pgx/v5
This works great, however for our general usage we have attached an OTEL tracer to it.
https://pkg.go.dev/github.com/jackc/pgx/v5#ConnConfig.Tracer

    config, _ := pgxpool.ParseConfig("postgres://test:[email protected]:5432/test?sslmode=require&pool_max_conns=10&pool_max_conn_lifetime=20&pool_max_conn_idle_time=10")
    config.Tracer = otelpgx.NewTracer()
   conn, err := pgxpool.NewWithConfig(ctx, config)

currently looking at the migrate codebase I do not see an option to pass the tracer as a config option...

Describe the solution you'd like
A possibility to pass a tracer to the config

Why
It is useful to know how long some migration statements have run atomically .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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