Do not log certain 404s as "Unknown route"
See original GitHub issueWhen an endpoint returns 404, the transaction name in APM is logged as “<METHOD> Unknown route”.
In some cases this is desired behavior, however it doesn’t really play well with REST.
If, for example, the endpoint /api/customers/{id}
returns 404 because the route exists but the customer with that id doesn’t, then we’d like to see this logged under endpoint name in APM instead of “Unknown route”.
Is your feature request related to a problem? Please describe. I guess this is related to: https://github.com/elastic/apm-agent-dotnet/pull/953/files
Describe the solution you’d like We’d like to be able to mark some endpoints in any way, so that their 404 response logs with correct transaction name
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How can I get Express.js to 404 only on missing routes?
404 error in a service is typically used to denote that the requested resource is not available. In this article we will see...
Read more >404 has the message "Internal Error" · Issue #6793
Describe the bug When you hit a route that doesn't exist, the error message is "Internal Error" instead of something like "Page not...
Read more >404s not tracked in redirect 404. [#3071041]
Problem/Motivation Whenever unknown path is checked, and this happens through the decoupled router module, 404 tracking is not performed.
Read more >Thousands of 404 errors in Google Webmaster Tools
Webmaster Tools is notoriously slow at updating the links/errors page. In particular, even when a page is no longer linked to, ...
Read more >URL woes. Small subset of URLs returning 404s
In my root urls.py I have the following (this is a very small preview of the entire file). CAS URLs issue urlpatterns =...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we can adjust this. This part of the spec says how it should work:
So based on this, the agent isn’t aligned with the spec. By looking a bit into this, I think this check here needs to be refined. If it matches a route, we should still take it as a transaction name, even if it returns 404.
@skuc-fp just in case you don’t know - you’ll still have the full url, it’s just not in the transaction name, so you can figure out which ids returned 404, but indeed you need to dig into every single transaction (see screenshot:)
We’ll discuss this, but to me it seems in the specific case with existing routes we should adapt the agent and always report those with the route as the transaction name.
I opened https://github.com/elastic/apm-agent-dotnet/pull/1715 which addresses this issue.