optimize: add default NoRoute and NoMethod handlers to assist troubleshooting#1447
Open
DMwangnima wants to merge 1 commit intocloudwego:mainfrom
Open
optimize: add default NoRoute and NoMethod handlers to assist troubleshooting#1447DMwangnima wants to merge 1 commit intocloudwego:mainfrom
DMwangnima wants to merge 1 commit intocloudwego:mainfrom
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1447 +/- ##
==========================================
- Coverage 86.24% 85.55% -0.69%
==========================================
Files 148 148
Lines 14158 14181 +23
==========================================
- Hits 12210 12132 -78
+ Misses 1417 1412 -5
- Partials 531 637 +106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6112909 to
112c305
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
optimize
Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
Users often do not proactively set 404/405 handlers via
engine.NoRouteandengine.NoMethod, resulting in monitoring/logging being unable to obtain valid handler information throughRequestContext.HandlerName.Adding default NoRoute and NoMethod handlers provides valid handler information, enabling more effective troubleshooting.
zh(optional):
用户往往不会主动通过 engine.NoRoute 和 engine.NoMethod 设置 404/405 的 Handler,导致监控/打点通过 RequestContext.HandlerName 无法获取到有效的 Handler 信息。
添加默认的 NoRoute 和 NoMethod Handler 来提供有效的 Handler 信息,从而更好地排查问题。
(Optional) Which issue(s) this PR fixes:
(Optional) The PR that updates user documentation: