Optimize is not showing queries
I've been trying to get optimize to work since it first launched in beta, but queries just don't show up in the dashboard.
i'm not sure how to get more logging...
32 Replies
Do you get any errors while trying to use Optimize?
none at all
the app works, the prompt+notification to go to the optimize dashboard pops up
just nothing shows up in the dashboard
random clues:
i already love open telemetry, and we have our own instrumentation registered (but i believe i tried removing it, and there were no changes)
we are a monoropo running on turbo, prisma is imported from a shared project, and is using singleton pattern
I have the same
I have been facing the same issue since the beta. Not sure why it's not working either
Is there a flag to pass to make it log its issues?
Soo for me recording catch only create/delete queries all select queries are omitted.
Is that how it works normally?
I'm using main / replica setup using @prisma/extension-read-replicas extension as well. Not sure if that's affecting it somehow. @Nurul (Prisma)
Nope that was my fault. There is a section about data that should be captured by recording
Also good to know if some of the queries are not shown you should try to change the order of extends
e.g first you use optimize then accelerate
I don't use the other services. I did attempt changing the order of extends but no luck
What flag can we use to make optimize log verbose?
Maybe this will help you https://www.prisma.io/docs/optimize/known-limitations. At the bottom is Driver adapter compatibility and that can cause problems
Well I'm using the client as is, there is no driver adapter involved.
@samuelcole @DennisK @brookmg
Are your projects in which you are trying to use optimize open source? Would it be possible to share a minimal reproduction so that we can figure out what's going on?
Nope sorry, it is not OS.
We have released a new optimize extension version 1.0.1 which fixes a bunch of issues. Can you try using the new version and check if your issue gets resolved?
https://www.npmjs.com/package/@prisma/extension-optimize
npm
@prisma/extension-optimize
This is the package for the Prisma Client extension, which enables the use of Prisma Optimize.. Latest version: 1.0.1, last published: 36 minutes ago. Start using @prisma/extension-optimize in your project by running `np...
Sadly can't share the codebase but the lastest update isn't working either. 1.0.1.
This is how I currently configured it but nothing shows up on the dashboard
Thanks for letting me know. Can you try without readReplicas extension and check if something shows up in the dashboard?
1.0.1 isn’t working for me either, and I don’t use readReplicas
Do we all use next.js by any chance? This is a next app
Oh Okay! Is your app open source by any chance samuel?
it is not 😕
also i would like to reiterate that i would love an additional logging level, so that i can see under the hood a bit, to see if there's any clues there
Same issue here. Everything runs but no queries show in optimize console.
Was able to get it working.. Found that we weren't using the read replica extension, but we were instantiating a separate PrismaClient with the datasources option set:
{
datasources: {
db: { url: config.PRISMA_READ_URL }
}
}
This caused the issue..
I have the same issue (also a private repo so can not share).
I've followed the instructions and set everything up, I see
See your Optimize dashboard at: https://optimize.prisma.io
in the console, hit record, and nothing showing up as I play around in my app.
Any updates @Nurul (Prisma) ?Was this issue resolved? I am getting the same (empty results) with the latest version - 1.0.1 🙈
Can you check if the example I shared in this thread works for you?
https://discord.com/channels/937751382725886062/1270167207204356178/1270167207204356178
@Nurul I had the same issue with optimize not showing any queries. In our case I found out that the issue was that optimize doesn’t work when there is sentry node profiling configured. Is there some issue tracking where thisissue could be posted?
Hey @diginikkari
I wasn't aware about the issue with sentry node profiling.
Do you mind creating an issue?
https://github.com/prisma/optimize-feedback/issues
I'll share it internally with our Optimize team 🙏
Hi @Nurul
Sure, I created issue with reproduction repo linked: https://github.com/prisma/optimize-feedback/issues/18
GitHub
Optimize not recording any queries when there is Sentry node profil...
Describe the bug When configuring Prisma Optimize to app where also Sentry is used, optimize doesn't record any queries. To Reproduce Steps to reproduce the behavior. I have created minimal rep...
Hey I'm experiencing the same issue with a raw config, nothing shows in my dashboard 😉
Same issue here, I am using Nest js. Maybe it has something to do with extension initialization in my case
@nanou @_patatinabollente Do you mind sharing a minimal reproduction with us?
Hi,
I have followed the instruction so
Here is my prisma schema
Then I extended my prisma client
I think the issue could be this extension on Nest js but I've tried all the examples on https://github.com/prisma/prisma/issues/18628 and nothing seems to work for me.
The related issue is relative to maintaining type safety while extending prisma client. I do not think is necessary in this case.
For context i am using nest 9 (tried also with 10, no difference) and node 18 (also here tried with 20 no difference)
Hope it helps
Thanks
GitHub
Ability to extend
PrismaClient
class w/ Client Extensions before ...Problem Within NestJS, the common solution to implementing an injectable Prisma Client instance is to extend PrismaClient and add the onModuleInit and enableShutdownHooks functions required by Nest...
With :
And without any error in the console (except if I pass an empty API_KEY)
What happens if you test without the readReplicas?