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

Add a config flag to add a context key with the current query name #2617

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jille
Copy link
Contributor

@Jille Jille commented Aug 14, 2023

Multiple people have asked for more involved features like stats, but with this simple context injection people can implement their own DBTX and do whatever they want from there.

My use case is also measuring query durations per query

Multiple people have asked for more involved features like stats, but
with this simple context injection people can implement their own DBTX
and do whatever they want from there.

My use case is also measuring query durations per query
@kyleconroy
Copy link
Collaborator

It's an interesting approach. Before merging this, I'd like to spend a bit more time thinking through a solution that uses the interceptor pattern from gRPC. I'm not sure it will map cleanly to sqlc-generated code, but it would solve many of the customization issues that we face today without requiring new configuration parameters.

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

Successfully merging this pull request may close these issues.

2 participants