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

fix(txnames): Avoid replacing url encoded transaction names #1839

Merged
merged 10 commits into from
Feb 13, 2023

Conversation

olksdr
Copy link
Contributor

@olksdr olksdr commented Feb 10, 2023

Modified regex to avoid replacing url encoded strings, this way if there are something like %[A-F0-9] in the string, we will skip replacing it, since we do track only the named captures.

/cc @jan-auer

fix: https://github.com/getsentry/team-ingest/issues/56

#skip-changelog

@olksdr olksdr self-assigned this Feb 10, 2023
@olksdr olksdr requested a review from a team February 10, 2023 13:06
@olksdr olksdr requested a review from jan-auer February 10, 2023 13:26
@jan-auer jan-auer changed the title fix(txnames): avoid replacing url encoded transaction names fix(txnames): Avoid replacing url encoded transaction names Feb 10, 2023
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

The change looks good, but there are still tests failing.

.to_string();
if *trans != changed && changed != "*" {
// Sort by the longest match end.
caps.sort_by_key(|(m, _)| m.end());
Copy link
Member

Choose a reason for hiding this comment

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

nit: Rename m to match everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

match is actually the reserved word 😄. But I also can change it to capture, since it's basically what it is. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in 85a517d

@olksdr olksdr enabled auto-merge (squash) February 13, 2023 15:14
@olksdr olksdr merged commit 4bf162b into master Feb 13, 2023
@olksdr olksdr deleted the fix/do-not-match-urlencoded-string branch February 13, 2023 15:16
jan-auer added a commit that referenced this pull request Feb 14, 2023
* master:
  feat(relay): Implement factor based multi-matching [TET-665] (#1790)
  fix(rate-limits): Rate limit profiles attached to transactions (#1843)
  fix(txnames): Avoid replacing url encoded transaction names (#1839)
  meta: Remove cargo vet (#1841)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants