You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop-docs/backend/application-domains/grouping.mdx
+49-29Lines changed: 49 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,10 @@ by the client yet, three systems start operating:
33
33
the special `{{ default }}` value.
34
34
35
35
It's important to know that the grouping algorithm can produce more than one fingerprint hash. These hashes
36
-
are collected and associated with issues. There are two types of hashes that can be created:
37
-
38
-
* flat hashes: these are traditional hashes where all hashes are equal. If any of these hashes exists in a group
39
-
it is associated with it and any hash not yet associated with the group is added.
40
-
* hierarchical hashes: these are secondary hashes that can be used to subdivide a group in the grouping tab.
36
+
are collected and associated with issues via the `GroupHash` model. If any of these hashes exists in a group
37
+
the event is associated with it, and any hash not yet associated with the group is added. In practice this
38
+
means an event may produce both an "app" hash (using only in-app frames) and a "system" hash (using all frames),
39
+
and either one matching an existing group is sufficient.
41
40
42
41
# Issue / Group Creation
43
42
@@ -56,9 +55,40 @@ event as it flows further through the system to make it's way towards snuba, is
56
55
which also means that the group is persisted in snuba along with the event.
57
56
58
57
Upon group creation, additional code runs such as the triggering of alerts, regression detection and more.
59
-
It is thus relatively expensively to create a group due to the number of additional actions that can be
58
+
It is thus relatively expensive to create a group due to the number of additional actions that can be
60
59
triggered from it.
61
60
61
+
# AI Grouping
62
+
63
+
In addition to fingerprint-based grouping, Sentry uses AI to further improve issue grouping accuracy.
64
+
This system identifies issues with similar stacktraces and error messages that might have different fingerprints
65
+
due to minor code variations. AI grouping works alongside traditional fingerprinting, occurring *after* hash-based lookup
66
+
and *before* new group creation:
67
+
68
+
1. The event's hashes are computed via the standard grouping algorithm.
69
+
2. Sentry checks whether any of those hashes already belong to an existing group via the hash-based lookup.
70
+
3. If no existing group is found, and the event is eligible, Sentry generates an embedding
71
+
of the error's message and in-app stack frames, compares this embedding against existing
72
+
error embeddings for that project, and merges the new error into an existing issue if a similar
73
+
issue is found within the configured threshold.
74
+
4. If no match is found (or the event is ineligible), a new group is created as before.
75
+
76
+
Eligibility is determined by [`should_call_seer_for_grouping`](https://github.com/getsentry/sentry/blob/master/src/sentry/grouping/ingest/seer.py)
77
+
in `src/sentry/grouping/ingest/seer.py`. Beyond the fingerprint check above, it also considers:
78
+
79
+
- Whether the event has a usable stacktrace
80
+
- Whether the event's platform is supported
81
+
- Whether the project has AI-enhanced grouping enabled
82
+
- Rate limits (both global and per-project)
83
+
- A circuit breaker that trips if error rates are too high
84
+
- Stacktrace size limits
85
+
86
+
Results — including the matched grouphash, match distance, and model version — are
87
+
persisted in the [`GroupHashMetadata`](https://github.com/getsentry/sentry/blob/master/src/sentry/models/grouphashmetadata.py)
88
+
model alongside the event's hash-based grouping metadata.
89
+
90
+
More details on the AI grouping process can be found on the public facing docs [here](https://docs.sentry.io/concepts/data-management/event-grouping/#ai-enhanced-grouping).
91
+
62
92
# Merges and Splits
63
93
64
94
The system does not cope particularly well with merges and splits because the events in Snuba are generally
@@ -148,8 +178,7 @@ existing group.
148
178
Sentry at the moment feeds the entire stack into the group. There is a way to limit the number of frames
149
179
contributed down to a smaller set by setting a maximum number of frames that should be considered. This
150
180
has a hypothetical advantage when working with different paths that lead to a bug but have the consequence
151
-
that very large groups can be created. Creating larger groups is tricker in Sentry as without hierarchical
152
-
grouping there are no good ways to dive into the different stacks in an issue.
181
+
that very large groups can be created.
153
182
154
183
## Fallback Grouping
155
184
@@ -171,37 +200,28 @@ think of grouping as a problem of the source of the error. At any point the que
171
200
source of the error is "how we call a function" (caller error) or "in the function" (callee error). Making
172
201
this decision is impossible to make in a general sense, but over time it can be easier to make this call.
173
202
174
-
Sentry has an experimental grouping system called "hierarchical" grouping where we allow diving into the
175
-
different paths towards a bug by preferring to over-group and then provide a grouping tab that can show
176
-
the different paths by which we came to the error. However the limitation of this with the current group
177
-
system is that since the group has been created, there is now way to split out, you can end up with a much
178
-
larger group than you desired.
179
-
180
203
# Paths Forward
181
204
182
-
The grouping system as implemented relates very close to the work flow that is established with the groups
183
-
that are created. It is the creator of the groups and as the creator, it drives a big part of the user
184
-
experience that derives from it. If it were to create a single issue per event, or a single issue for all
185
-
events nothing in Sentry would properly function any more. It is thus our first point of balancing the
186
-
quality of the workflow. Unfortunately with the tools available today there we are sitting in a pretty
187
-
tough spot at the time of grouping. If we get it wrong, the user is likely stuck.
205
+
The grouping system is tightly coupled to the workflow that issues drive. It is the creator of the groups
206
+
and as the creator, it drives a big part of the user experience. If it were to create a single issue per
207
+
event, or a single issue for all events, nothing in Sentry would properly function. It is thus our first
208
+
point of balancing the quality of the workflow.
188
209
189
-
The following general paths forward are current envisioned:
210
+
## Improving AI-Enhanced Grouping
211
+
212
+
The introduction of AI-enhanced grouping has already improved the caller-vs-callee problem described
213
+
above, but there is ongoing work to improve model accuracy, expand platform support, and reduce latency.
214
+
Key areas include better handling of hybrid fingerprints, improving confidence thresholds, and training on
215
+
broader datasets.
190
216
191
217
## Groups of Groups
192
218
193
219
The consequences of making too many groups today are alert spam and the inability to work with multiple
194
220
issues at once. If Sentry were to no longer be alerting on all new groups and tools existed to work
195
-
across multiple groups more opportunities arise. In particular the grouping algorithm could continue to
221
+
across multiple groups, more opportunities arise. In particular the grouping algorithm could continue to
196
222
just fingerprint the stack trace but a secondary process could come in periodically and sweep up related
197
223
fingerprints into a larger group. If we take the `get_current_user` example the creation of 50 independent
198
-
groups is not much of an issue if no alerts are fired. If after 5 minute the system detected that they are
224
+
groups is not much of an issue if no alerts are fired. If after 5 minutes the system detected that they are
199
225
in fact all very related (eg: the bug is "in `get_current_user`") it could leave the 50 generated groups
200
226
alone but create a new group that links the other 50 groups, hide/deemphasize the individual 50 groups in
201
227
the UI and let the user work with the larger group instead.
202
-
203
-
## Evaluate Hierarchical Grouping
204
-
205
-
We also have the hierarchical grouping prototype which tries to group on fewer inputs. This system has
206
-
some limitations but it's less likely to create many groups. Unfortunately the user experience is
207
-
not fleshed out as working with parts of the group is not an option.
Copy file name to clipboardExpand all lines: develop-docs/development-infrastructure/frontend-development-server.mdx
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ You have the ability to only run a frontend development server that will proxy a
12
12
pnpm dev-ui
13
13
```
14
14
15
-
The development server can be viewed at [https://dev.getsentry.net:7999](https://dev.getsentry.net:7999). `dev.getsentry.net` is an alias for `localhost` and it's preferred because it supports subdomains. You can also create your own domain alias, as with ngrok, if you like.
15
+
The development server can be viewed at [https://dev.getsentry.net:7999](https://dev.getsentry.net:7999). `dev.getsentry.net`supports subdomains and is the preferred domain for development. It's just an alias of localhost, you can also create your own domain alias, as with ngrok, if you like. If that domain is not resolving then it could be an issue with your DNS settings (or with your home network DNS settings), then add `127.0.0.1 dev.getsentry.net` to your `/etc/hosts` file.
16
16
17
17
In any case, you can now login to your development server with your Sentry.io credentials. The SSO-login flow will *NOT* work. Only email/password is supported on the login form in development.
18
18
@@ -21,6 +21,8 @@ While the SSO-login flow will not work, cookies from an existing logged-in sessi
21
21
-[Get Cookie Sync for Chrome](https://chrome.google.com/webstore/detail/sentry-cookie-sync/kchlmkcdfohlmobgojmipoppgpedhijh)
22
22
-[Get Cookie Sync for Firefox](https://addons.mozilla.org/en-US/firefox/addon/sentry-cookie-sync/)
23
23
24
+
**Note**: If the Cookie Sync extension is not working, make sure to log in to production first (https://sentry.sentry.io), then open the dev server domain in a new tab. (https://sentry.dev.getsentry.net:7999).
25
+
24
26
## Admin UI
25
27
26
28
To access the admin UI (files under `gsAdmin`), you can run:
@@ -39,15 +41,15 @@ Make sure you have cookies synced (see above), as authentication is required to
39
41
40
42
If you see an error similar to the below when accessing the development server:
41
43
42
-

44
+

43
45
44
46
You can either grant a temporary exception in your browser, or create and install a local certificate and use your OS to mark them as "trusted". TLS is required for the frontend development service, since the production API is served over https.
45
47
46
48
Follow the steps [To Enable HTTPS for your devserver](/development/environment/#enabling-https).
47
49
48
-
You can now run the dev server with `pnpm dev-ui` and open [https://localhost:7999](https://localhost:7999). There should not see a warning about your connection not being private. You should also see a lock or similar icon in the address bar of your browser.
50
+
You can now run the dev server with `pnpm dev-ui` and open [https://dev.getsentry.net:7999](https://dev.getsentry.net:7999). There should not see a warning about your connection not being private. You should also see a lock or similar icon in the address bar of your browser.
49
51
50
-

52
+

51
53
52
54
**NOTE**: For Firefox users that use the master password you will be prompted for it with this message: "Enter Password or Pin for "NSS Certificate DB":"
Copy file name to clipboardExpand all lines: develop-docs/engineering-practices/commit-messages.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ The header has a special format that includes a type, a scope and a subject:
45
45
<footer>
46
46
```
47
47
48
-
The **header** is mandatory and the **scope** of the header is optional. If you have a Jira issue to link to, add the **jira-id** the commit belongs to. This helps to connect changes back to Jira tickets.
48
+
The **header** is mandatory and the **scope** of the header is optional. If you have a Linear issue to link to, add the **linear-id** the commit belongs to. This helps to connect changes back to Liner tickets.
49
49
50
50
Any line of the commit message should not be longer than 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
0 commit comments