Commit ebddea7
authored
fix(grouping): Only collect metadata timing metric when actually getting metadata (#81252)
In #81070, a metric was added to time the gathering of grouphash metadata. Unfortunately, it's timing also all the cases in which we don't have to gather such data as well (which are the vast, vast majority of cases - for example, in the last 24 hours, we’ve hit roughly 2.5 million cases where the function it's timing has no-opped and only about 400 in which the function's actually had to do any work). As a result, the actual timing data we care about is being utterly drowned out.
This fixes that by moving the timer from wrapping `create_or_update_grouphash_metadata` to wrapping it's helper, `get_hash_basis_and_metadata`, which only runs when the calculation is needed. It also renames the function we have been timing from `create_or_update_grouphash_metadata` to `create_or_update_grouphash_metadata_if_needed`, to make it clearer that it's just a wrapper which may no-op. (It's this unclear naming on my part which led to the confusion in the first place.)1 parent 7e3f4c3 commit ebddea7
File tree
3 files changed
+19
-9
lines changed- src/sentry/grouping/ingest
- tests/sentry/grouping
3 files changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| |||
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
124 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
168 | 177 | | |
169 | 178 | | |
170 | 179 | | |
| 180 | + | |
| 181 | + | |
171 | 182 | | |
172 | 183 | | |
173 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments