New ASP.NET Web API Relics

I am trying to use the New Relic.NET agent in my web interface, but all requests are displayed as System.Web.Http.WebHost.HttpControllerHandler , which is exactly what docs knows the question section says

MVC 4 (Note: The new Relic provides limited ASP.NET Web API support for MVC4. All Web API transactions will display as HttpControllerHandler and not as the name of the web controller API.)

I was looking for any workaround that leads to a more readable control panel. Is there any configuration in my application or IIS that I could change to have more meaningful metrics in my dashboard? Or is there a way to implement API calls to change this behavior?

+4
source share
3 answers

NewRelic has released an update for the .NET Agent that should fix your problem.

See: https://newrelic.com/docs/releases/dotnet . "Improved WebAPI support. Now you should see web transactions grouped by [controller]. [Action], and not all WebAPI transactions transmitted as System.Web.Http.WebHost.HttpControllerHandler."

+2
source

you can get better results by setting transaction names through the API. But until New Relic improves overall support for the ASP.NET Web API, there is no way to arbitrarily contribute things to web transactions.

https://newrelic.com/docs/dotnet/the-net-agent-api SetTransactionName ()

In addition, if you specify specific methods for tracking, when everything is slow and the transaction trace is generated, you will see that these method traces are displayed in the form of a trace tree.

https://newrelic.com/docs/dotnet/CustomInstrumentation

+1
source

This is a rather old post, but I spent a lot of time investigating a similar problem, and in my case, these delays appeared only during POST, where the HTTP message had a request.

Ultimately, this was due to network performance issues (mobile clients), and POST tried to read the body of the message, which takes a lot of time to transmit. The failure is that these delays when displayed in the controller handler were actually just waiting for the transfer of the request body.

0
source

Source: https://habr.com/ru/post/1483699/


All Articles