Using Monitor in ASP.Net

6 posts, 0 answers
  1. Graham Wade
    Graham Wade avatar
    4 posts
    Member since:
    Nov 2009

    Posted 24 Jun 2013 Link to this post

    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.
  2. Soren
    Admin
    Soren avatar
    44 posts

    Posted 25 Jun 2013 Link to this post

    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.

  3. Graham Wade
    Graham Wade avatar
    4 posts
    Member since:
    Nov 2009

    Posted 26 Jun 2013 Link to this post

    Soren
        Thanks this was exactly what I was looking for.

    Regards
    Graham Wade
  4. Tomica
    Tomica avatar
    147 posts
    Member since:
    Apr 2008

    Posted 05 Sep 2013 Link to this post

    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")
  5. Soren
    Admin
    Soren avatar
    44 posts

    Posted 06 Sep 2013 Link to this post

    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 >>
  6. Tomica
    Tomica avatar
    147 posts
    Member since:
    Apr 2008

    Posted 06 Sep 2013 Link to this post

    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".
Back to Top