This is a migrated thread and some comments may be shown as answers.

Using Monitor in ASP.Net

5 Answers 79 Views
Monitor integration
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Graham Wade
Top achievements
Rank 1
Graham Wade asked on 24 Jun 2013, 10:07 AM
I am new to ASP and AM and so this may be a simple answer but where should I put the monitor start and monitor stop statements.

Any help gratefully received.

5 Answers, 1 is accepted

Sort by
0
Soren
Telerik team
answered on 25 Jun 2013, 07:01 AM
Hi Graham,

Thanks for trying out our service. The AnalyticsMonitor (AM) can be used in an ASP.NET application, though there are some things to be aware of. 

First thing to note is that using the AM on the server side of a web application cannot track the individual users of your application. The AM is designed to provide insights into the execution of a single application so you can use the monitor to track information about the server itself (which features are being used more often, reporting unhandled exceptions being thrown etc) and this will provide valuable insights into the server as an application. The AM used on the server cannot track the individual users of the web application, it is simply not designed for such a scenario. If you do decide to use the AM on the server to monitor the server, we recommend that you perform the initialization logic (creating and starting the monitor) in the Application_Start method of the Global.asax file and similarly call the Stop method in the Application_End method. Dependent upon your internal architecture you can then provide access to this initialized monitor instance throughout your code.

Secondly, if your goal is to track the actual users of the web application, I'd suggest you take a look at our javascript monitor which is currently available in a beta build. This will allow you to include a small monitor as part of the individual web page being rendered and you can then track features being used by calling on the javascript API. This will of course only make sense if your web application already has a certain amount of javascript code, otherwise it would probably include some work to wire things up on your part.

Hope this help, let me know if you have any additional questions

 

Regards,
Soren
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Graham Wade
Top achievements
Rank 1
answered on 26 Jun 2013, 04:01 PM
Soren
    Thanks this was exactly what I was looking for.

Regards
Graham Wade
0
Tomica
Top achievements
Rank 2
answered on 05 Sep 2013, 11:02 PM
we recommend that you perform the initialization logic (creating and starting the monitor) in the Application_Start method of the Global.asax file and similarly call the Stop method in the Application_End

Do you have an example that this newbie can work from?

I would like to do the initialization in Global.ASX but you cannot just put in the example code that works in an ASPX page as I do here:

Dim monitor As IAnalyticsMonitor = AnalyticsMonitorFactory.CreateMonitor("key")
monitor.Start()
monitor.TrackFeature("global.start")
0
Soren
Telerik team
answered on 06 Sep 2013, 09:46 AM
Hello guys,

Thomas, I may have partially answered what I think is your question in another thread, but I'll just repeat it here. In ASP.NET, the monitor should be initialized and started in the Global.asax file (or somewhere similar) as you should only have a single monitor instance within the server application. Furthermore, it is important to note precisely what kinds of data you'll be collecting with a single monitor in ASP.NET, most significantly that you'll not be collecting individual user data. Check out this blog post for details: http://www.telerik.com/analytics/resources/blog/13-06-26/eqatec-analytics-in-asp.net

So you might be tempted to create, start and stop a new monitor within each page but you should refrain from this pattern. The monitor instance is not designed for such a use and will both report inconsistent data and the use of many monitor instance simply does not scale well.

Let me know if this answers you question.

Regards,
Soren
Telerik
JAVASCRIPT MONITOR (BETA) AVAILABLE FOR DOWNLOAD.
Monitor web applications with the new EQATEC Application Analytics JS library. Compatible with all modern browsers.
Test it today >>
0
Tomica
Top achievements
Rank 2
answered on 06 Sep 2013, 11:00 PM
Yes, this answers my question.

I do have a related question in a parallel thread, but consider this one closed, with your reply marked as "answer".
Tags
Monitor integration
Asked by
Graham Wade
Top achievements
Rank 1
Answers by
Soren
Telerik team
Graham Wade
Top achievements
Rank 1
Tomica
Top achievements
Rank 2
Share this question
or