getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
37.08k stars 3.98k forks source link

fix(feedback): add metrics for user report linking during event inges… #70116

Closed JoshFerge closed 2 weeks ago

JoshFerge commented 2 weeks ago

We are diagnosing and fixing a problem with how user reports (old) are shimmed into user feedbacks (new).

The issue lies in event ingestion, as here we associate user reports with their events. It was assumed this only happened during user report ingestion, and the update_user_report task.

In order to fix this, we either have to:

It would be preferred to do the feedback shimming directly in ingestion here. The overhead of this shouldn't be high, as all it really does is format the event correctly and emit a kafka message to the occurrence topic, but will double check the performance of this carefully.

In this first PR, behind a flag, we:

The query needs to be changed as we want to get an accurate count of when we are actually updating records (update returns rows matched, not rows updated).

Depends on https://github.com/getsentry/sentry/pull/70114

To Follow: https://github.com/getsentry/sentry/pull/70117

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.83%. Comparing base (14b3dc7) to head (c501758).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #70116 +/- ## ========================================== - Coverage 79.83% 79.83% -0.01% ========================================== Files 6507 6507 Lines 289592 289592 Branches 49868 49868 ========================================== - Hits 231193 231191 -2 - Misses 57986 57988 +2 Partials 413 413 ``` [see 7 files with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry/pull/70116/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)