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

rails/app: ignore "catch-all" routes #1092

Merged
merged 1 commit into from
May 21, 2020
Merged

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented May 21, 2020

Fixes #1091 (Performance - all routes appear as / with 10.0.3. Works fine in
9.5.5)

When using Rails' recognize, catch-all routes have higher precedence than real
routes. By skipping catch-all routes we can fall through to the next route,
which appears to be a real route.

One gotcha is that the API we use to check for "catch-all" routes is not
available on Rails 4.1 and lower (only Rails 4.2+).

Fixes #1091 (Performance - all routes appear as / with 10.0.3. Works fine in
9.5.5)

When using Rails' `recognize`, catch-all routes have higher precedence than real
routes. By skipping catch-all routes we can fall through to the next route,
which appears to be a real route.

One gotcha is that the API we use to check for "catch-all" routes is not
available on Rails 4.1 and lower (only Rails 4.2+).
@kyrylo kyrylo force-pushed the 1091-apm-engine-routes-fix branch from e7b7156 to e4cf458 Compare May 21, 2020 10:05
@kyrylo kyrylo merged commit ddf92ab into master May 21, 2020
@kyrylo kyrylo deleted the 1091-apm-engine-routes-fix branch May 21, 2020 10:26
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.

Performance - all routes appear as / with 10.0.3. Works fine in 9.5.5
1 participant