-
-
Notifications
You must be signed in to change notification settings - Fork 210
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: Use fallback if RoutePattern is MVC. #1188
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1188 +/- ##
==========================================
- Coverage 80.55% 80.51% -0.05%
==========================================
Files 212 212
Lines 6891 6902 +11
Branches 1573 1579 +6
==========================================
+ Hits 5551 5557 +6
Misses 822 822
- Partials 518 523 +5
Continue to review full report at Codecov.
|
Despite a context feature having a RouteEndpoint, it doesn't mean we can use the RawText value of the RoutePattern since it may result in a default route for different paths.
For a simple fix, I opted to just use the fallback to get the MVC route since we didn't have any proper data of the Route Template on the given Endpoint.
Additionally, that the SDK is creating transactions for items like loading a CSS file, thus results in Unknown Routes. If desired, we could use context.Request.Path.Value as a last fallback for cases like that.
Sample:
Also, the issue can be easily reproduced on the sample Sentry.Samples.AspNetCore.Mvc
Close #1189.