Skip to content

fix(grouping): Preserve fingerprint component boundaries in beta config - #128732

Open
akasakariko wants to merge 1 commit into
getsentry:masterfrom
akasakariko:fix/fingerprint-component-boundaries
Open

akasakariko wants to merge 1 commit into
getsentry:masterfrom
akasakariko:fix/fingerprint-component-boundaries

Conversation

@akasakariko

Copy link
Copy Markdown

Summary

  • Length-prefix fingerprint values using their encoded byte lengths so distinct component lists no longer collide through concatenation
  • Enable the new encoding only in the opt-in beta grouping configuration newstyle:2026-10-24
  • Preserve hashes for existing configurations and keep newstyle:2026-01-20 as the default
  • Treat the complete default expansion as one hybrid fingerprint value while preserving its internal grouping equivalence
  • Exclude the beta configuration from automatic deprecation

Reproduction

  • Confirmed on unmodified master at 86b1728a40fc57fd64ca6fb5e7c892b17c061b8c through the event grouping API
  • ["checkout", "12", "34"] and ["checkout", "123", "4"] produced the same hash
  • The tenant examples and hybrid fingerprints containing {{ default }} also collided
  • The same reproduction produces distinct hashes with the new beta configuration

Compatibility and rollout

  • Existing projects retain their historical hashes unless they explicitly switch configuration
  • Opting into beta changes custom and hybrid fingerprint hashes, including fingerprints produced by server and built-in rules, so rollout must account for the resulting regrouping
  • Ordinary default grouping, checksums, and non-contributing variants remain unchanged
  • Most of the diff consists of 589 generated snapshots required for the newly registered configuration
  • Compared with the previous configuration, snapshot differences are limited to configuration IDs and fingerprint hashes for 11 inputs in each snapshot family

Verification

  • 1827 grouping variant, grouping info, hash metadata, and beta configuration tests passed
  • 95 related fingerprinting and enhancement tests passed
  • Regression coverage includes empty values, embedded NULs and colons, Unicode, value ordering, hybrid default positions, and fixed historical hashes
  • All pre-commit hooks passed and mypy passed for all eight changed Python files
  • Six additional integration cases failed because local Snuba connections were refused, comprising three unknown hash basis cases and three hydration rule cases
  • Local validation used Python major 3, minor 13, patch 15 rather than the pinned patch 17, with service validation skipped
  • The full repository suite was not run

Fixes #128520

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@akasakariko
akasakariko requested review from a team as code owners October 24, 2026 04:13
@cursor

cursor Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

This PR is too large for Bugbot to review. It changes 113,574 lines and 3,916,134 characters. Split the change into smaller pull requests to get a review.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 24, 2026

This branch has not been deployed

No deployments
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.

Custom fingerprints that concatenate to the same string end up in the same issue

1 participant