-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(events): Use SnubaEvent if option is turned on #12594
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
Conversation
Prevents 404s on event owners caused by sampling events when Snuba is on
We probably have to do the same in a few more endpoints, I wonder if there's any better solution |
|
||
event_cls = SnubaEvent if use_snuba else Event | ||
|
||
event = event_cls.objects.from_event_id(event_id, project.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.
Would it be outlandish to make Event.objects.from_event_id
do this logic internally? That might help you play fewer rounds of whac-a-mole.
Think I hit all the ones we need to update now |
Removing myself from review, but giving a generic +1 and following along. |
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.
Yeah this seems good.
+0.5 to Mark's comment about having the EventManager logic do this SnubaEvent/Event switching internally. If it can be done that way easily without coupling the 2 event types too much, then I would be for it.
* master: (50 commits) fix(ui) Don't show save-org-search on event search (#12785) ref(ui): Remove some unnecessary index.jsx files (#12606) feat(app-platform): Analytics (#12718) ref(js): Remove ApiMixin (#12384) test(js): Silence project plugin console info spam (#12761) test(js): Move SaveSearchStore.reset() (#12769) test(js): Add more fields to Group fixture (#12759) feat(app-platform): Integration "Learn More" modal (#12638) feat(saved-searches) Move create saved search button to search bar. (#12781) ref(global-header): Remove dead code (#12767) ref(releases): Refactored Releases Serializers (#12535) feat(app-platform): Sort Integrations (#12697) ref(audit-log): Log sso config updates (#12744) ref(app-platform): New 'Open In' UI (#12621) feat(events): Use SnubaEvent if option is turned on (#12594) feat(global-selection-header): show settings icon link in single project mode (#12772) refs(api): Consolidate all search backend code into `SnubaSearchBackend` fix(tests) Remove large snapshots (#12766) fix: Update symbolicator snapshots (#12710) ref: Upgrade semaphore (#12751) ...
Prevents 404s on various events endpoints caused by sampling events when Snuba is on