-
-
Notifications
You must be signed in to change notification settings - Fork 144
feat(database): add QueryExecuted event with query observability #1936
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
base: 3.x
Are you sure you want to change the base?
Conversation
|
cc @brendt @innocenzi because GitHub won't request review until the PR is ready. Do you think this is a good approach? |
|
I'm curious to understand why the event dispatcher needed being wrapped and what's the purpose of the Also not a fan of the dependency location in Otherwise, yes, we definitely want good observability (and that's something I already touched on on my local debug UI branch)! |
The dispatcher wraps
This one is fair, definitely something that needs a bit more thinking.
This makes sense too, a separate utility class would likely be better.
I'm very curious to see that local debug UI branch 👀 Should I continue exploring things here considering you've already started something (probably) similar? |
Definitely do!
I get it, but let's use That being said, since the event dispatcher is used in only one place, I'd rather not abstract it in a class. We'd need to have an interface instead (so it could be replaced), and the naming is confusing too. If we were to keep it, I'd rather have a database-specific implementation of But in my opinion, a |
I've done that in a previous commit 👀
I kind of agree, it actually started that way, but it felt too much. I'll bring it back, we'll see. Done with the edits, decided to remove the extra class in favor of the try-catch. Not sure if I want to stretch the scope of this PR, and if so, how much. Do we like this as-is? What do we not like? What should I add? |
Adds database observability via events.
Heavily WIP, any comments are welcome.