Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Yesterday, I decided to give NewRelic a try. I signed up for a free account, and installed the .Net agent, and restarted IIS as instructed. Immediately, this agent started showing up a wealth of information on the dashboard like:

  • most slow SQL statements
  • which methods are taking longest to execute
  • which pages are being accessed most frequently

How can the above and a lot more be done simply by installing the .Net Agent? I am concerned about the actual application performance - I've used profiling tools previously which greatly slow down the application by modifying the compiled DLLs. However, this tool does not seem to have modified anything.

I still need to make up what all this information means and how this could actually help me, but it looks quite 'magic' to me and am concerned if there are any performance implications in leaving the agent running and uploading information to the dashboard.

share|improve this question
add comment

2 Answers

New Relic says themselves that they use the .Net profiling API.

https://docs.newrelic.com/docs/dotnet/new-relic-net-installation#trouble

The .NET agent instruments application and system code using BCI (byte code injection). This is done by registering the New Relic agent with the CLR (Common Language Runtime) as a "profiler." The CLR calls out to the .NET agent when code is loaded, and the agent instruments the code if it's an interesting method call.

share|improve this answer
add comment

The key difference between the New Relic .NET Agent and traditional profiling tools is that the New Relic .NET Agent doesn't instrument everything. Developers at New Relic have gone through and picked out key methods in various frameworks (e.g., ASP.NET) and libraries (e.g., SQL Server) and the agent injects code into those methods only. A traditional profiler will inject code into everything which is why they generally slow your application down. By selectively injecting code, New Relic can be sure to keep overhead low yet still give you insight into the interesting parts of your application.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.