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

Attribute based Routing (ex WebAPI) can cause transaction naming issues #186

Closed
angelatan2 opened this issue Sep 8, 2020 · 0 comments · Fixed by #612
Closed

Attribute based Routing (ex WebAPI) can cause transaction naming issues #186

angelatan2 opened this issue Sep 8, 2020 · 0 comments · Fixed by #612
Assignees
Labels
bug Something isn't working MGI Metric Group Index

Comments

@angelatan2
Copy link
Contributor

Description
This may be considered a bug in the agent. From the logs, we know that URI-based naming is taking place and then a subsequent instrumentation point changes the name to WebTransaction/ASP/.

bq. 2018-08-06 14:03:14,939 NewRelic FINEST: Setting transaction name to UriTransactionName{"Uri":"api/v3/users/detect","IsWeb":true} (priority 1) from WebTransactionName{"Category":"ASP","Name":"Integrated Pipeline","IsWeb":true} (priority 0)
bq. 2018-08-06 14:03:15,111 NewRelic FINEST: Setting transaction name to WebTransactionName{"Category":"ASP","Name":"","IsWeb":true} (priority 4) from UriTransactionName{"Uri":"api/v3/users/detect","IsWeb":true} (priority 1)

Expected Behavior
There is only one instrumentation point that uses priority 4 and that's our instrumentation for GetRouteData. This instrumentation point can be useful in some applications that are declaring their routes upon application startup using the ASP.NET routing RouteCollection.MapRoute method. Some applications (especially WebAPI apps) could use RouteCollection.MapRoute to define its routes but instead, use different ways of defining routes like attribute-based routing or convention-based routing. In apps like these GetRouteData is still invoked but the route at this instrumentation point is an empty string. When this happens, we set the transaction name after WebTransaction/ASP to an empty string. We probably should do something different here and this will require some research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MGI Metric Group Index
Projects
None yet
2 participants