-
Notifications
You must be signed in to change notification settings - Fork 541
Django URLs with multiple placeholders cut off after first placeholder #2392
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
Comments
also noted here in this discussion |
Relevant/might be fixed by: #2325 |
TL;DR: My proposed course of action for now:
Some background: The fundamental problem here is that we're trying to parse a non-regular language with regular expressions in the resolver. Any regex we come up with will never fully "work". There will always be counter examples of perfectly fine URL patterns that will not be parsed correctly. To illustrate, consider these proposed candidates and URL patterns they won't work for (paste e.g. to https://regex101.com/ to play with these):
While this list is definitely not exhaustive, the point I want to make is that any regex we choose will have to come with some assumptions about what constitutes a "correct URL pattern", simply because regexes inherently can't solve this problem. In other words, any change we will make to the regex will introduce a regression, so we should approach any changes to this very carefully. (Or come up with a new approach to named group matching in the resolver.) |
👍 for the proposed course of action. Would supporting "nice" transaction names for |
@salomvary The problem is that |
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
Expected Result
Transaction name is
/api/0/organizations/{organization_slug}/events-trace/{trace_id}/
Actual Result
Transaction name is renamed from
/api/0/organizations/{organization_slug}/events-trace/{trace_id}/
to/api/0/organizations/{organization_slug}/
.Product Area
Other
Link
No response
DSN
No response
Version
No response
The text was updated successfully, but these errors were encountered: