-
Notifications
You must be signed in to change notification settings - Fork 63
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(agent): Slim txn naming updates #917
Conversation
1) the scheme for route run to correlate with proper OAPI naming was incorrectly listed 2) kept same naming scheme in route:run by putting it before wrapper_call and saying ok to overwrite 3) number 2 needed to incorporate fallback naming scheme 4) added fallback naming scheme (since some errors and middleware intervention hides the txn name) using dispatcher:dispatch. When there is an exception thrown in a route that is handled by the slim routing and error middleware, it is superseded by: Uncaught exception 'Slim\\Exception\\HttpNotFoundException' with message 'Not found.' and transformed into an http 404 error and is shown in the http.statuscode field as 404. If the middleware isn't loaded, it is recorded as an uncaught exception and status code is 200. Wrap function Slim\\Routing\\Dispatcher::dispatch It will name set the txn_name in case we hit an error and Slim\\Routing\\Route::run isn't called. It is set to be overwritable do that if we encounter Slim\\Routing\\Route::run, it can overwrite with the most accurate info (this is only relevant in the case of redirects). This allows us to give the txn_name even in error cases when Slim\\Routing\\Route::run isn't called.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #917 +/- ##
==========================================
- Coverage 78.79% 78.74% -0.05%
==========================================
Files 193 193
Lines 27214 27230 +16
==========================================
Hits 21443 21443
- Misses 5771 5787 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Michal Nowacki <[email protected]>
Co-authored-by: Michal Nowacki <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
When there is an exception thrown in a route that is handled by the slim routing and error middleware, it is superseded by: Uncaught exception 'Slim\Exception\HttpNotFoundException' with message 'Not found.' and transformed into an http 404 error and is shown in the http.statuscode field as 404. If the middleware isn't loaded, it is recorded as an uncaught exception and status code is 200.
Wrap function Slim\Routing\Dispatcher::dispatch
It will name set the txn_name in case we hit an error and Slim\Routing\Route::run isn't called. It is set to be overwritable do that if we encounter Slim\Routing\Route::run, it can overwrite with the most accurate info (this is only relevant in the case of redirects). This allows us to give the txn_name even in error cases when Slim\Routing\Route::run isn't called.
Corresponds with multiverse updates which passed against this branch.