-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add SQL query counts to tasks and API #2370
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should refactor this but its not a huge deal
One odd behavior this creates is our integration tests effectively nest context managers, so i.e. the store_event task ends up suggesting it executes a LOT of queries, but really its just the sum of all child tasks. |
Current coverage is
|
@mitsuhiko @tkaemming if this seems sane to one of you guys i'll go ahead and push it out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really need a cryptographic hash rather than hash
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i always forget that python maps strings to the same
Generally +1. (I didn't try and run this or give it a super thorough review though.) I could see an argument for keeping track of and logging the duplicate query statements as well, but that's easy enough to do later. |
Also putting this in |
I may just put it in sentry.debug idk |
ab608d7
to
e0a5066
Compare
03928d0
to
59cc451
Compare
5952483
to
643bc85
Compare
Going to get this in today |
I'm thinking we need a way to whitelist things, but we can sort that out later. It's likely this will pollute Sentry a bit right now, so we'll run it for a day or two and then decide how we want to deal with it. |
This puts some basics in place to let us do production based perf assertions.
The change itself adds duplicate queries (>= 3) and total queries (>= 25) to tasks and API endpoints.
@getsentry/api @getsentry/infrastructure