New Performance Issue Types #37083
Replies: 13 comments 11 replies
-
To help aid this conversation, the example that started it all: O(N) queries Often consumers of ORMs will generate a SQL query in a loop without even knowing it. These are generally trivial to detect, but are often ignored or missed until capacity of the system (the database in this case) becomes an issue. They're typically easy to fix, so detecting them early is critical to maintaining stability. Similar in nature, duplicate queries can also be caught this way. If you execute the same call N times in a request lifecycle, there's sometimes ways to consolidate those calls. This one is usually more relevant when the query returns large data sets (total bytes) or takes a long time. Otherwise the duplicate calls can be hard to optimize as they generally will live in fairly different sections of the application. |
Beta Was this translation helpful? Give feedback.
-
An easy performance issue many front-end developers will understand immediately is if your page has excess component re-renders. For example, a sidebar component re-renders multiple times, even though it's content stays the same. We track A developer would ideally put in some kind of memoization or change how context is propagated to address this issue. This might be pretty specific to vdom browser frameworks, but perhaps we can abstract it out to UI's in general, since we generally use the same It's important to note that this has the chance of false positives, so we'll have to put some thought into how to avoid that Perhaps this also leads us to further integrate with things like https://reactjs.org/docs/profiler.html, but I think we have some room to explore here. |
Beta Was this translation helpful? Give feedback.
-
A request being canceled by the user (connection lost for example) should be considered as a failed transaction? Another point are timeouts on Backend, you may just be getting a symptom of the problem on the Transaction and a Developer may need to further investigate if the issue is on that specific transaction with specific user inputs or it's a chain reaction of another part of their systems not working. In this case, maybe we could introduce new types, for example: database_timeout, database_deadlock,... |
Beta Was this translation helpful? Give feedback.
-
Backend related: For me a quite useful callout I wish I would get if an API call (or an entire transaction) deviates from the baseline a lot. Quite often that is obviously caused by something like a bad database query (can be an N+1 query) but it can also just be because the input to the backend call is larger than anticipated. For instance from my own experience at Sentry we have customers who upload 5 source maps, and we have customers who upload 50.000 source maps. For the latter a quite common experience is that this not just slows down, but it also can then eventually cause failures. I wish Sentry called that out before it becomes fatal. So the generalized version of this is understanding when an endpoint does work in relation to large and seemingly unbounded input data. Similar issues we have with some internal endpoints that scale badly to large project counts in organizations for instance. I wish I would be alerted of this instead of having to manually look. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if we currently capture enough information to be able to alert on this, but another database use case would be detecting full table scans which could indicate a missing index or poorly designed query. My guess is we'd probably need some way to trigger an |
Beta Was this translation helpful? Give feedback.
-
One idea from the Performance team is waterfall span detection. If dupliate non-overlapping spans are appearing in sequential order, that's a performance issue. One example of this is Python code that makes sequential slow calls to a service, when it should be using an async approach like |
Beta Was this translation helpful? Give feedback.
-
A small but maybe powerful idea is to detect identical spans. One example is front-end code that makes multiple GET requests to the same URL during page load. This often happens in more complicated codebases as the code grows and people stop auditing the requests that happen during initial load. |
Beta Was this translation helpful? Give feedback.
-
One other idea is to allow developers to manually create performance issues. We can add UI buttons to convert suspicious events, areas of graphs, or other performance objects to issues manually. e.g., a developer spots that the LCP graph has an unusual bump, and presses a button that reports that as a performance issue. @k-fish also pointed out that this is a good research tactic: we can see what people report as performance issues, and then try to automate that later. |
Beta Was this translation helpful? Give feedback.
-
I can't confidently speak to all the criteria above yet, but for our mobile SDKs I wonder if it would be useful to highlight likely-performance-degrading patterns like IO happening on the main thread. If we see it happening in the same trace as an ANR or slow/frozen frames then it would be especially likely to be relevant. I don't know how much more useful this is than a plain ANR/slow frame alert, but at least we might be able to hint at causes and solutions this way? (I also don't know if the SDKs are currently know which thread a particular span comes from, which I imagine would be a prerequisite). |
Beta Was this translation helpful? Give feedback.
-
@bruno-garcia brought up an issue to the team in a chat today about shader compilation in Flutter causing animations to render poorly. |
Beta Was this translation helpful? Give feedback.
-
For mobile applications: if there is massive overdraw, tell the user that this is making the app slow. See: https://developer.android.com/topic/performance/rendering/overdraw Can also support other rendering related problems, see https://developer.android.com/topic/performance/rendering/ |
Beta Was this translation helpful? Give feedback.
-
We're working on detecting one more specific issue type: slow database spans. See Notion for details. We're going to raise any egregiously slow database span as a performance issue if it exceeds a certain threshold. |
Beta Was this translation helpful? Give feedback.
-
Just surfacing another issue type we've been looking at: slow assets. (For employees, here's the Notion doc). There are two things we've been experimenting with detecting: large uncompressed assets (first pass: #37633, on hold) and slow render-blocking assets (first pass: #37826). Since render-blocking asset detection relies on heuristics (we don't currently know for sure that an asset is render-blocking with what our SDKs currently collect) we'll be validating the detector's accuracy before creating any actual performance issues from it. |
Beta Was this translation helpful? Give feedback.
-
We are soliciting ideas for possible performance issues that we can deliver this year.
Some problem constraints to get your creative juices going!
1) Problem can be confidently detected by Sentry! Introduce more signal than noise.
2) The problem detected is actionable, otherwise its just noise again.
3) The problem detected is VALUABLE to a developer.
Or hey, challenge the constraints we're putting around this problem. =)
If you have an idea, reply with:
Beta Was this translation helpful? Give feedback.
All reactions