0

I am using Elastic APM agent (https://www.elastic.co/guide/en/apm/agent/dotnet/current/index.html) to instrument an ASP.NET MVC Application. I added the nuget packages and added the module entry in the web.config. I am able to get data in the Kibana APM tab and nicely shows the time spent by each call. (see screenshot below). Sample screenshot

Mu Question is: How can I drill down inside each of these calls to see where the time is spent in the stackstace? Is there something I am missing?

Emad Gabriel
  • 3,677
  • 7
  • 37
  • 49

1 Answers1

1

There are basically 2 ways the agent captures things:

  • Auto-instrumentation: in this case you don't write any code, the agent just captures things for you - this is what we see on your screenshot
  • Manual code instrumentation - for this you can use the Public Agent API and capture things programatically.

In a typical ASP.NET Classic MVC application the agent has auto instrumentation for outgoing HTTP calls with HttpClient, Database calls with EF6 (Make sure to add the interceptor) (SqlClient support is already work-in-progress, hopefully released soon). So unless you have any of these within those requests, the agent won't capture things out of the box.

If you want to capture more things, currently the way to go is to place some agent specific code - so basically manual code instrumentation - into your application and use the public agent API.

gregkalapos
  • 3,529
  • 2
  • 19
  • 35
  • Thanks @gregkalapos ! So for example, in a typical multi layer application (web - Business - Data - Some helpers,..), only http calls and EF calls will be auto instrumented? Any methods in business layer, helpers, etc. will need to be manually instrumented, right? – Emad Gabriel Apr 07 '20 at 02:21
  • 1
    @EmadGabriel yes, correct. The plan is to have auto instrumentation for more and more libraries over time. – gregkalapos Apr 07 '20 at 08:27