Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing context in WithInstance method #1159

Open
maksim77 opened this issue Sep 12, 2024 · 1 comment
Open

Missing context in WithInstance method #1159

maksim77 opened this issue Sep 12, 2024 · 1 comment

Comments

@maksim77
Copy link

maksim77 commented Sep 12, 2024

Is your feature request related to a problem? Please describe.
If the db.DB object is instrumented to work with Opentelemtry, the postgres.WithInstance method spawns a span (Ping method) learned from context.Background which is thus not bound to any trace.

Describe the solution you'd like
It would probably be cool to have a method like WithInstanceContext or something similar that takes a context as an argument and uses it in particular in the Ping method call

@joschi
Copy link
Contributor

joschi commented Sep 30, 2024

Kind of related to #1132.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants