feat(grouping): Collect grouphash metadata metrics #81070
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 involvedgrouping.grouphashmetadata.event_hashing_metadata.{hash_basis}
- for stacktrace, message, fingerprint, security report, and fallback hashing, tracks certain hashing-method-specific data (seeMETRICS_TAGS_BY_HASH_BASIS
for a list of what's collected)grouping.grouphashmetadata.create_or_update_grouphash_metadata
- times the process of collecting grouphash metadatagrouping.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.)