-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(grouping): Add hashing_metadata
field to GroupHashMetadata
table
#80531
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
feat(grouping): Add hashing_metadata
field to GroupHashMetadata
table
#80531
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
025d660
to
ba4b790
Compare
346966d
to
3088a38
Compare
ba4b790
to
f4d76ec
Compare
3088a38
to
17feb79
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #80531 +/- ##
==========================================
- Coverage 78.41% 78.41% -0.01%
==========================================
Files 7209 7210 +1
Lines 319651 319691 +40
Branches 44003 44003
==========================================
+ Hits 250669 250700 +31
- Misses 62596 62605 +9
Partials 6386 6386 |
f4d76ec
to
a2827ab
Compare
17feb79
to
9851620
Compare
9851620
to
9dc1640
Compare
a2827ab
to
9722292
Compare
9dc1640
to
1484bfd
Compare
1484bfd
to
15764da
Compare
Right! That's why I originally had it as a JSON field. I couldn't remember why I'd chosen that over the gzipdict, and so I swapped it in order to get the defaults-to-an-empty-dict-rather-than-null behavior. But past-past-me was smarter than recent-past me - you're absolutely right, it should be JSON. Thank you for catching that! |
7347bfa
to
b9eb3d7
Compare
8150b8a
to
9fa314a
Compare
This PR has a migration; here is the generated SQL for --
-- Add field hashing_metadata to grouphashmetadata
--
ALTER TABLE "sentry_grouphashmetadata" ADD COLUMN "hashing_metadata" text NULL; |
# Metadata about the inputs to the hashing process and the hashing process itself (what | ||
# fingerprinting rules were matched? did we parameterize the message? etc.). For the specific | ||
# data stored, see the class definitions of the `HashingMetadata` subtypes. | ||
hashing_metadata: models.Field[HashingMetadata | None, HashingMetadata | None] = JSONField( |
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.
why does this need to be repeated HashingMetadata | None, HashingMetadata | None
?
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.
Not well documented (that I could find), but this is the setter type and the getter type: https://github.com/typeddjango/django-stubs/blob/ab4dcfa002dbe138b7548086328f13cbde3c41b3/django-stubs/db/models/fields/__init__.pyi#L46-L51.
b9eb3d7
to
a35e40f
Compare
9fa314a
to
d8bd096
Compare
a35e40f
to
ad48885
Compare
d8bd096
to
17b2bb9
Compare
ad48885
to
391c240
Compare
17b2bb9
to
bb4227a
Compare
391c240
to
d91f58e
Compare
bb4227a
to
6ff5709
Compare
6ff5709
to
f777dc8
Compare
# Conflicts: # migrations_lockfile.txt
f777dc8
to
b9e323d
Compare
This adds a new field,
hashing_metadata
, to theGroupHashMetadata
table, to serve as a compliment to thehash_basis
field added in #79835.Whereas that field stores the overall grouping method (stacktrace, message, custom fingerprint, etc.), this new field will store more detailed, grouping-method specific data. For example, when grouping on message, it will store whether or not the message was parameterized; when grouping on fingerprint, it will store the source of the fingerprint; when grouping on stacktrace, it will note whether the stacktrace was found in an exception or in a thread. (The full scope of the data stored for each grouping method can be found in the
XYZHashingMetadata
types added in this PR.)Code to add data to this field is included in #80534.