-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ref(aci): tagged event and event attribute subfilters for event frequency conditions #87807
ref(aci): tagged event and event attribute subfilters for event frequency conditions #87807
Conversation
…nt frequency conditions
case EventAttributeFilter.id: | ||
comparison_filter["attribute"] = condition["attribute"] | ||
case TaggedEventFilter.id: | ||
comparison_filter["key"] = condition["key"] |
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.
these two conditions only differ in that one has an attribute
key and the other one has key
, and we'll need to query snuba differently
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.
feels so weird to have a switch statement (match) but not have to worry about fall through from the cases. haha
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.
lgtm! thanks for adding types to the ATTR_CHOICES too 🫶
case EventAttributeFilter.id: | ||
comparison_filter["attribute"] = condition["attribute"] | ||
case TaggedEventFilter.id: | ||
comparison_filter["key"] = condition["key"] |
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.
feels so weird to have a switch statement (match) but not have to worry about fall through from the cases. haha
…ency conditions (#87807)
Event frequency conditions that query Snuba will also include additional query filters for tags and event attributes.
The tag filter is currently implemented -- this queries the
tags
column in Snuba for thematch
and thevalue
.However, for event attributes, each attribute is a separate Snuba column that we need to query separately for the
match
andvalue
.This PR prepares for querying each event attribute filter separately by storing the event attribute filter differently from tagged event filter, using each filter's respective
comparison_json_schema
.