Skip to content

feat(issues): Add hex parameterization experiment #93970

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

Merged
merged 4 commits into from
Jun 20, 2025

Conversation

mrduncan
Copy link
Member

@mrduncan mrduncan commented Jun 20, 2025

Our existing hex parameterization supports hex values of any length however they must begin with either 0x or 0X. We frequently see hex values in messages which do not have this prefix (ex: trace ids or span ids).

This adds support for hex values which do not have the 0x prefix. To ensure it does not over-parameterize the following requirements:

  • Must be exactly 4 or 8 bytes (8 or 16 characters)
  • Must contain both a number and a letter
  • Must use lowercase letters (anecdotally I've never seen examples where uppercase would be beneficial)

We're replacing the hex pattern in place in the experiment so that when this is rolled out it doesn't trigger a rehash.

The addition of EXPERIMENT_PARAMETERIZATION_REGEXES_MAP and other parameters will all be removed once the rollout of this is completed.

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

codecov bot commented Jun 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #93970       +/-   ##
===========================================
+ Coverage   32.87%   83.22%   +50.35%     
===========================================
  Files        8839    10352     +1513     
  Lines      497640   598127   +100487     
  Branches    23233    23212       -21     
===========================================
+ Hits       163599   497791   +334192     
+ Misses     333573    98977   -234596     
- Partials      468     1359      +891     


# Hex value without 0x or 0X prefix exactly 4 or 8 bytes long.
#
# We don't need to lookahead for a-f since we if it contains at
Copy link
Member Author

Choose a reason for hiding this comment

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

We also can't use the built in lookahead attribute on ParameterizationRegex since we don't want it to match the existing pattern above on line 189.

@mrduncan mrduncan marked this pull request as ready for review June 20, 2025 20:07
@mrduncan mrduncan requested a review from a team as a code owner June 20, 2025 20:07
@mrduncan mrduncan merged commit fdd385e into master Jun 20, 2025
65 checks passed
@mrduncan mrduncan deleted the mrduncan/hex-experiment branch June 20, 2025 21:10
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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