Hi, is there a way to log queries in a way where i...
# orm-help
b
Hi, is there a way to log queries in a way where it can access the request/parent context? We are using https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#on so far, but maybe I missed something obvious. Query logging with https://github.com/iamolegga/nestjs-pino seems to be missing request context and therefore the request id, also using datadog for tracing seems to not being able to correlate query traces with request traces. I assume this is due to the way how prisma is designed (with its separate query engine), is this something which can be improved once using n-api mode?
r
@Benjamin Klotz 👋 This is currently not possible, but it would be great if you could create a feature request here so that we can look into this 🙂
fast parrot 1
prisma cool 1
b
Created the gh issue at https://github.com/prisma/prisma/issues/7596 thx for your response ✌️
🙌 1
@Ryan my wording here seems to be prone to misunderstandings, to clarify I meant passing in the parent or request context through async_hooks https://github.com/DataDog/dd-trace-js/issues/1244#issuecomment-859700903
let me know whether I need to update the contents of the GH issue 🙂
r
I think it should be fine as you have mentioned the issue that contains the comment and the description seems appropriate 🙂
🙌 1