Prisma Sentry Tracing
Why does prisma sentry tracing looks like this? What is this http request supposed to be? I see it all the time but with different ports. Is this the way the application communicates with prisma engine?
9 Replies
Hi @Senshi 👋
Are you referring to this integration?
https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/prisma/
At the moment, I am not sure where that HTTP request comes from. I'll need to check with team internally
Yes, talking about that one
If useful, this is the code I am executing
@Nurul Hello, any news here? 🙂
Hi, thanks for the ping and apologies for the delay.
I am out of office at the moment. My colleague @RaphaelEtim should be able to help you out. Raph - can you check with ORM team if they have any insights?
@Nurul @RaphaelEtim Hello guys, it's still relevant for me, so any news?
Hey, Apologies for the delay in getting back to you 🙏
This thread slipped through the cracks.
The HTTP request you're seeing is indeed related to how your application communicates with the Prisma query engine. This is part of Prisma's architecture where the Prisma Client communicates with the query engine, which runs as a separate process.
The HTTP request is a part of
prisma:client:serialize
span which represents how long it takes to validate and transform a Prisma Client operation into a query for the query engine (Docs reference). This internal communication is not something you typically need to interact with directly. It's part of Prisma's internal architectureOpenTelemetry tracing (Preview) | Prisma Documentation
Diagnose application performance with detailed traces of each query.
Ok got it, thanks. I could not find part in docs where it stated that prisma engine and client communicate with each other via HTTP 🙂
And another question (not related to it). Is Query engine ran as separate process?
Reason of asking: Because if it's ran as separate processor there might be reason of allocating more than 1 vCpu for application (if app is only on nodejs there is no point of doing so, but if prisma is ran as separate process maybe it's useful).
@Nurul
Not by default. Query Engine runs as a separate process only if Query Engine is complied as binary:
https://www.prisma.io/docs/orm/more/under-the-hood/engines#the-query-engine-at-runtime
If you have not specified engineType=binary then it won't run as a separate process:
https://www.prisma.io/docs/orm/more/under-the-hood/engines#defining-the-query-engine-type-for-prisma-client
Engines | Prisma Documentation
Prisma's query engine manages the communication with the database when using Prisma Client. Learn how it works on this page.