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

feat(ds): Detect health check routes with trailing slash #81117

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jan-auer
Copy link
Member

Detect health check routes with an without a trailing slash. Relay's pattern
matcher currently doesn't match groups with empty alternates (*/ping{,/}), so
we duplicate all rules. On the upside, this leaves the pattern matcher in an
efficient postfix match.

Fixes #81028

@jan-auer jan-auer requested a review from a team November 21, 2024 14:19
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 21, 2024
Comment on lines +793 to +805
# Same as above with trailing slash. Relay's pattern matcher cannot handle
# optional trailing slashes.
"*/health/",
"*/healthy/",
"*/healthz/",
"*/_health/",
r"*/\[_health\]/",
"*/live/",
"*/livez/",
"*/ready/",
"*/readyz/",
"*/ping/",
"*/up/",
Copy link
Member

Choose a reason for hiding this comment

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

Should we do this in Code instead? Automatically duplicate all entries with a slash?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will wait for getsentry/relay#4277 instead.

Copy link

codecov bot commented Nov 21, 2024

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   #81117      +/-   ##
==========================================
- Coverage   78.49%   78.48%   -0.02%     
==========================================
  Files        7215     7215              
  Lines      319812   319811       -1     
  Branches    44045    44046       +1     
==========================================
- Hits       251040   251000      -40     
- Misses      62387    62412      +25     
- Partials     6385     6399      +14     

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.

Trailing slash on Health Check glob patterns
3 participants