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

feat(grouping): Collect grouphash metadata metrics #81070

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

lobsterkatie
Copy link
Member

This adds a number of metrics to track grouphash metadata:

  • grouping.grouphashmetadata.event_hash_basis - tracks the overall grouping method, including whether or not a hybrid fingerprint was involved

  • grouping.grouphashmetadata.event_hashing_metadata.{hash_basis} - for stacktrace, message, fingerprint, security report, and fallback hashing, tracks certain hashing-method-specific data (see METRICS_TAGS_BY_HASH_BASIS for a list of what's collected)

  • grouping.grouphashmetadata.create_or_update_grouphash_metadata - times the process of collecting grouphash metadata

  • grouping.grouphashmetadata.backfill_needed - tracks instances in which we'd backfill missing metadata, to help estimate the load that will create. As the accompanying comment says, this greatly overestimates the number of backfills we'd actually do (since we see the same grouphashes repeatedly, and each would only need to be backfilled once), but given that all we need is an upper bound in order to set our initial backfill sample rate, it's good enough for now.

To test the first two metrics, they and their tag values have been added to the grouphash metadata snapshots. (The timer metric wasn't included because there's not much to test there, and the backfill metric wasn't included because it's temporary.)

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/grouping/ingest/grouphash_metadata.py 94.73% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81070      +/-   ##
==========================================
- Coverage   78.49%   78.48%   -0.01%     
==========================================
  Files        7215     7215              
  Lines      319793   319816      +23     
  Branches    44034    44040       +6     
==========================================
+ Hits       251009   251018       +9     
- Misses      62399    62406       +7     
- Partials     6385     6392       +7     

@lobsterkatie lobsterkatie force-pushed the kmclb-collect-hashing-metadata-metrics branch from ab73cef to 83fb5cf Compare November 20, 2024 21:32
@lobsterkatie lobsterkatie marked this pull request as ready for review November 20, 2024 22:16
@lobsterkatie lobsterkatie requested a review from a team as a code owner November 20, 2024 22:16
@lobsterkatie lobsterkatie merged commit 32dd816 into master Nov 21, 2024
50 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-collect-hashing-metadata-metrics branch November 21, 2024 19:24
Copy link

sentry-io bot commented Nov 22, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ OperationalError: OperationalError('server closed the connection unexpectedly\n\tThis probably means the server ter... sentry.tasks.store.save_event View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants