-
Notifications
You must be signed in to change notification settings - Fork 62
Emit query log in quaint:query span, rather than in its parent #431
Conversation
@@ -14,8 +14,16 @@ where | |||
U: Future<Output = crate::Result<T>>, | |||
{ | |||
let span = info_span!("quaint:query", "db.statement" = %query); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the query engine binary and node API, This span is filtered-in by target , because it is user facing but doesn't have a user_facing
attribute. Should we add the attribute to prevent this additional filtering based on the target?
I know, it's coupling quiant to engine needs. But isn't that already based on all the tracing features added to it?
Given the correct behavior of this patch, the simplicity of the change, and the lack of required reviewers for quaint, I will merge this on Monday, unless there's strong opposition --in a bias to action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Tracked in https://github.com/prisma/client-planning/issues/158
Addressed the problem expressed in https://github.com/prisma/client-planning/issues/158#issuecomment-1405530608
Before this change query log events where not attached to the
quaint:query
span but its parent. This had implications on log capturing. mainly, thatBEGIN
iTX queries where not logged until its owner span (itx_runner) was not closed at the end of the transaction.