Elastic APM with ASP.NET 4.7.2 questions

Greetings All !

So, about two years ago, another developer decided to add Elastic APM to an existing ASP.NET (non-core) application. (Not sure what version of .NET it was on at the time, but we're on 4.7.2 right now.)

At the time, that developer (who is no longer with the company) wrote that the Public API/agent wasn't quite ready for prime-time, and so he elected to use the javascript API/agent instead. (I'm not sure what version he used, as the minimized script that he included in the project is named "apmclientweb.min.umd.js".)

This has worked in a basic way for a while: We've been seeing page load data / tracing in Elastic just fine. And we've been capturing errors, but nobody has really looked at them.... until now....

I was asked to look into why we had several spikes in Errors being recorded in Elastic for this app for the past two months. I put quite a few hours into it. But other than determining that several of the spikes were being reported by a very small number of users.... or by PCs that have been dedicated as "wall monitors" that show the app... I really haven't been able to figure out much. All of the Exceptions are rather cryptic in what they report and their stack traces don't reveal much. OK, so the PageRequestManager reports a server request timed out... or that the status code returned (from.... something....) was 401....but I don't see any information about the request we were trying to make.

I was just wondering if anyone else has used the javascript agent with a .NET ASP (non-core) project... and if they had any advice on figuring out / tracking down errors (I've googled myself to death)... or on somehow rigging things so that I get more details back regarding future errors?

Or, another question / consideration that I have is: What if I switched this whole thing over to using the Public API? Would it still capture any errors from Microsoft's Ajax Script Library / Manager? (Right now, all C# errors are being written out to disk via log.net.)

Thank you!

Hi @DR4296, it sounds like there are possibly two discrete sources of telemetry data that you're interested in:

  1. Telemetry from the client side of the ASP.NET application. It sounds like this is what is currently configured.

  2. Telemetry from the server side of the ASP.NET application.

For number 1, I'm not sure what "apmclientweb.min.umd.js" is, but I think your ex-colleague's comment might be in reference to the APM Real User Monitoring (RUM) agent which I think would have been in early stages a couple of years ago, but is now production-ready. This agent is a JavaScript file that can be installed with a <script> tag on the page (or using a bundler) and configured to send captured telemetry about

I don't know 100% whether it will capture errors with MS AJAX library, but I would imagine it to do so since it captures details about AJAX requests.

For number 2, the .NET agent can be configured for an ASP.NET application to capture telemetry information about what happens on the server side for requests.

Thanks for the info and thanks for clarifying!

Yes, I believe #1 is what we're already capturing. I'm just having a heck-of-a time trying to decipher root causes on those Microsoft Ajax Scripting Library exceptions.

But it's enlightening to see that I would have to run the .NET API at the same time to capture the server stuff. I'm sure that wouldn't be a problem.

Thank you!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.