Join Slack
Powered by
Hi, is there a way to log queries in a way where i...
# orm-help
b
Benjamin Klotz
06/10/2021, 5:14 PM
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
Ryan
06/11/2021, 6:10 AM
@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
Benjamin Klotz
06/11/2021, 7:36 AM
Created the gh issue at
https://github.com/prisma/prisma/issues/7596
thx for your response ✌️
🙌 1
Benjamin Klotz
06/11/2021, 5:13 PM
@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
Benjamin Klotz
06/11/2021, 5:13 PM
let me know whether I need to update the contents of the GH issue 🙂
r
Ryan
06/14/2021, 5:09 AM
I think it should be fine as you have mentioned the issue that contains the comment and the description seems appropriate 🙂
🙌 1
8
Views
Open in Slack
Previous
Next