Skip to content
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

[actions][sentry] apply fingerprint rules to group issues better #455

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

gutsytechster
Copy link
Contributor

@gutsytechster gutsytechster commented Sep 18, 2024

Sentry groups issues by the provided message argument in the implemented scenario. However, when the message includes a pattern recognizable by sentry defined here - https://github.com/getsentry/sentry/blob/master/src/sentry/grouping/parameterization.py#L56, values against these patterns are replaced with placeholders and aren't used to group issues.

E.g., if the sentry title contains hostnames with the same exception, the two would be grouped as below

Prashant Test Local | Development | Spider bookspider.com notification
Prashant Test Local | Development | Spider quotespider.com notification

grouped into

Prashant Test Local | Development | Spider <hostname> notification

This would be unintended behaviour, and we'd like to have the two spiders raise two different sentry alerts.

Providing spider's title to the fingerprint would ensure that the exact message is used to create fingerprints, and hence the two issues will have separate fingerprint values and eventually two different sentry issues.

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.58%. Comparing base (d7d553a) to head (816186b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #455      +/-   ##
==========================================
+ Coverage   79.54%   79.58%   +0.03%     
==========================================
  Files          76       76              
  Lines        3242     3242              
  Branches      539      539              
==========================================
+ Hits         2579     2580       +1     
  Misses        593      593              
+ Partials       70       69       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@muzaffaryousaf
Copy link
Contributor

@gutsytechster were you able to test the changes ? Thanks.

@gutsytechster
Copy link
Contributor Author

gutsytechster commented Sep 19, 2024

Hi @muzaffaryousaf

Yes. Here's a sentry alert that grouped events of the different domain alike spiders together. This was previous to fixes.

Here's how it grouped these events
image

After fixes, the two separate events were triggered for these two spiders - bookspider.com and quotespider.com

Here's how it grouped these events.
image
image

Notice Fingerprint values in these images, where issue title is used to group on top of the {{default}} values.

@VMRuiz VMRuiz requested review from curita and fcanobrash October 1, 2024 10:15
…ues better

This allows for grouping issues by title, when it may contain pattern recognizable
via sentry and pattern values are ignored.
@gutsytechster gutsytechster force-pushed the spidermon-sentry-fingeprinting branch from 8450a84 to 816186b Compare October 8, 2024 18:28
@gutsytechster
Copy link
Contributor Author

After discussion with monitoring team, we'd like to categorize only based on the event title only, discarding the default grouping. It'll be unique for each spider and it will group all types of spidermon errors under the same issue.

@VMRuiz VMRuiz closed this Oct 10, 2024
@VMRuiz VMRuiz reopened this Oct 10, 2024
@VMRuiz VMRuiz merged commit 29095ed into master Oct 10, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants