Jan Palas
Jan Palas

Reputation: 1895

Monitoring Entity Framework performance in ASP.NET app with Application Insights Status Monitor

I have been monitoring my ASP.NET application with Application Insights (AI). Lately, I also installed AI Status Monitor to my web server (Windows Server 2012 R2 with IIS) to get more detailed stats about my app. As the documentation says, AI Status Monitor reports dependency diagnostics, ie. calls databases, REST APIs, etc. Thus I thought I would get diagnostics of my database calls that are performed via Entity Framework in my app.

However, no database calls diagnostics appears in my AI for the app. However, AI Status Monitor works because I started to recieve diagnostics about other dependencies but database (ie. blocking communication ports on firewall is not likely to be an issue here).

Has anyone successfuly set up AI Status Monitor to report database diagnostics with Entity Framework? Am I missing any configuration that needs to be added to either app's code or AI Status Monitor?

Upvotes: 5

Views: 2464

Answers (1)

BrettJ
BrettJ

Reputation: 980

One possible problem is that you need to add the identity of the IIS application pool to the "Performance Monitor Users" group, that might be your problem; if you are also not getting any performance counter data sent up, then this is definitely the cause of that.

The other possibility is that the "profiling" is not getting enabled on your IIS site. When you launch AI SM on the webserver, there will be a button in the upper right corner "Update config" if the COR profiling has been disabled for IIS (you'd click that button, then a few seconds later click the Restart IIS button). If you are encountering this situation, you might have a conflict if your corporate environment uses SCOM. It will work for a few days, but eventually SCOM will notice a piece of itself is no longer working, and it will override it, and you'll lose dependency data again. There is a conflict between AI SM and SCOM's MMA that won't be resolved until SCOM 2016.

Upvotes: 1

Related Questions