ref(feedback): move user report event linking to post_process#70197
Conversation
| ) | ||
|
|
||
| if user_reports_updated: | ||
| metrics.incr("event_manager.save._update_user_reports_with_event_link_updated") |
There was a problem hiding this comment.
If this metric is supposed to show how many were updated, then increment by the row count.
| metrics.incr("event_manager.save._update_user_reports_with_event_link_updated") | |
| metrics.incr("event_manager.save._update_user_reports_with_event_link_updated", user_reports_updated) |
If it's meant to be just a call count, leave it as is.
There was a problem hiding this comment.
it should be synonymous with call count as the number of times that an event is linked to more than one report is near 0
| else: | ||
| UserReport.objects.filter(project_id=project.id, event_id=job["event"].event_id).update( | ||
| group_id=group.id, environment_id=event.get_environment().id | ||
| ) |
There was a problem hiding this comment.
If overwriting all is fine, then why not just do that instead of trying to get null ones?
AFAIK an update to same value as already in row should be a no-op in PostgreSQL.
There was a problem hiding this comment.
that is what we originally did, but am about to make an update where we don't simply want to overwrite all, as we want only the reports that do not currently have a group associated #70200
moved to post_process in jferg/user-report-post-process See: * #70197
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
currently we link user reports to groups in event_manager. we'd like to move this to post_process to get it out of the main ingestion path.
This PR simply copies the code over from the event manager.
We'll do a follow up PR to delete the code from event manager after this has fully deployed, as to not miss any links.