-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(inbound-filters): Move filters to generic filters #73840
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #73840 +/- ##
========================================
Coverage 78.10% 78.10%
========================================
Files 6660 6667 +7
Lines 297718 297609 -109
Branches 51232 51204 -28
========================================
- Hits 232546 232461 -85
+ Misses 58902 58871 -31
- Partials 6270 6277 +7
|
src/sentry/ingest/inbound_filters.py
Outdated
|
||
generic_filter = generic_filter_fn() | ||
if generic_filter is not None: | ||
generic_filter["id"] = generic_filter_id |
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.
Decided to put the id
here. A bit risky but reduces duplication and arguments of the closures.
src/sentry/ingest/inbound_filters.py
Outdated
("*", "*https://reactjs.org/docs/error-decoder.html?invariant={418,419,422,423,425}*"), | ||
("*", "*https://react.dev/errors/{418,419,422,423,425}*"), |
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.
Ideally, in this case we omit the check for event.exceptions.ty
.
This PR ports the first two inbound filters to the new generic filters implementation, namely chunk load errors and hydration errors.
The definition of the new generic filter is very close to the previous hardcoded definition in Relay (for the
errorMessages
inbound filter); however, it differs in the matching of thety
andvalue
. In Relay, there is an additional step in which, if bothty
andvalue
are set, Relay will try to match the string in the form"{ty}: {value}"
, which is currently not expressible withRuleCondition
constructs.Our plan is to roll out this implementation and check how many occurrences of the error messages are still going through the old filter and act accordingly.
Closes: getsentry/relay#2850