2
votes

I am designing a system (stack: MVC 5, EF6, SQL Server) which needs to capture a lot of information about user interaction with various components of the app.

E.g.

  1. How much time a user spend on a particular screen.
  2. What action is the user performing: viewing, editing a page/form
  3. Idle time
  4. Progress in a particular workflow

And show all this information on a Management dashboard which is part of the same web app. The traditional way of doing this would be to fire a sql query when a certain action happens and save this information in the application database. The thing is that, I don't want to overload the main application server with all these tasks and this approach doesn't seem too robust to me.

I was reading about Application Insights (Telemetry and custom events) and it seems that it should work for my problem statement. The only problem is that it is very tightly coupled with Azure resources and portal dashboard (as per my understanding).

So my question is: Can I use ApplicationInsights package to capture metrics and persist the data in a local SQL database and show it on a custom dashboard?

I read about continuously exporting telemetry information from Azure Storage to Power BI or SQL DB but wont work for me because I cannot use Azure as an intermediary. https://azure.microsoft.com/en-in/documentation/articles/app-insights-export-telemetry/

Would really appreciate some guidance on this. Thanks.

1

1 Answers

2
votes

You can use PowerBI dashboards, with direct integration to Application Insights, specifically, with Analytics queries you likely may use in this scenario.

Also, you can consider using Application Insights API (https://dev.applicationinsights.io/) to achieve this directly, including integration with some popular dashboards. Note that API is now in early preview, so we may introduce some changes, but the overall shape should be stable.

I am also curious what prevents you from using Azure - we'd like to learn more about it. Please be aware of the fact that Application Insights stores it data in Azure

For the specific case when you want to use just Application Insights SDK, while storing and analyzing the data "locally" in your tool of choice - this is also possible. (Note: in this case you only benefit from App Insights SDK and schema, leave the door open for future possibility to use full App Insights). To achieve that, you can consider implementing a custom telemetry channel - see here for some additional information: http://apmtips.com/blog/2016/01/31/telemetry-channels-update
While implementing this approach, you should you should be mindful about the volumes - I would advocate for decoupling it through some form of a queue mechanism, makes it easier to protect your app, balance the load and also monitor ...