Skip to content

feat(grouping): Add ULID parameterization#107763

Draft
JoshFerge wants to merge 1 commit intomasterfrom
jferg/ulid-parameterization
Draft

feat(grouping): Add ULID parameterization#107763
JoshFerge wants to merge 1 commit intomasterfrom
jferg/ulid-parameterization

Conversation

@JoshFerge
Copy link
Member

Summary

  • Adds a new ulid parameterization regex that matches 26-character ULID identifiers
  • ULIDs use Crockford's Base32 encoding (0-9, A-H, J-K, M-N, P-T, V-Z), deliberately excluding I, L, O, U to avoid ambiguity
  • Pattern is case-insensitive (accepts both upper and lowercase)
  • Lookaheads require both a letter and a digit to avoid matching pure-alpha words or pure-numeric strings
  • (?!0[xX]) negative lookahead prevents matching 0x-prefixed hex values
  • Placed before the hex pattern to match before general hex matching

ULID Format

From the ULID spec:

 01ARZ3NDEK TSVO4RRFFQ69G5FAV
|----------|  |----------------|
 Timestamp       Randomness
 (10 chars)      (16 chars)

Test plan

  • Added test for uppercase ULID
  • Added test for lowercase ULID
  • Added test for ULID embedded in a message
  • Added negative test for pure-alpha 26-char Crockford Base32 string
  • Added negative test for string containing excluded char I
  • Verified existing hex tests still pass (including 24-digit 0x-prefixed hex)
  • pytest -svv --reuse-db tests/sentry/grouping/test_parameterization.py -- 204 passed

Parameterize ULIDs (26-char Crockford's Base32 identifiers) so that
messages differing only by ULID get grouped together.
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 6, 2026
Comment on lines +79 to +84
("ulid - lowercase", "01arz3ndektsv4rrffq69g5fav", "<ulid>"),
(
"ulid - in message",
"Failed to process 01H5V5KBSMQ8E6MTMHKQ8KT3SY",
"Failed to process <ulid>",
),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove this

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.

1 participant