-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to See the Stacktrace for Query Issues #87502
Comments
Assigning to @getsentry/support for routing ⏲️ |
Routing to @getsentry/product-owners-performance for triage ⏲️ |
@Ahmed-Elkholy thanks for raising this! I think Query Sources will help you. If you set up the SDK correctly, when you look at the Query Details page, you'll see the line of code where the query originated (though not the full stack trace). Watch out, we only gather query sources for slow queries (100ms or slower) so if you're seeing fast N+1s you might need to turn down the slow query threshold. If you're not using one of the SDKs that supports Query Sources, you can still manually instrument them, though it's more work. Would that work? |
@gggritso Thanks so much for your reply. We have a spring boot application and we are using JDBC Instrumentation https://docs.sentry.io/platforms/java/tracing/instrumentation/jdbc/. It seems like it does not support Query Source automatically, but I am not sure who can we manually instrument this. Can you guide me to the documentation for this? Thanks! |
@Ahmed-Elkholy I think you're the first person to ask how to do this manually! We don't have a lot of documentation on this topic, but I can link you to what I know:
You also might be able to ask for help from SDK folks in our Discord |
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
We want to easily identify the source of N+1 queries or slow queries by seeing their stacktrace. This would help us pinpoint where in the code the query is being generated, as it is not always straightforward to trace.
How are you getting stuck?
Currently, when investigating performance issues related to N+1 queries or slow queries, it is difficult to determine exactly where in our codebase they originate. While we can see query execution details, we don’t always get a clear stacktrace showing the function or file responsible for triggering them.
Is there a way in Sentry to view the stacktrace of these queries to help us debug more efficiently? If not, is there an alternative approach or workaround you recommend?
Where in the product are you?
Performance - Queries
Link
No response
DSN
No response
Version
No response
The text was updated successfully, but these errors were encountered: