{"id":1403,"date":"2014-04-23T15:42:00","date_gmt":"2014-04-23T15:42:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2014\/04\/23\/using-the-intellitrace-events-window-with-a-log-collected-from-mma-standalone\/"},"modified":"2022-07-17T23:44:33","modified_gmt":"2022-07-18T07:44:33","slug":"using-the-intellitrace-events-window-with-a-log-collected-from-mma-standalone","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/using-the-intellitrace-events-window-with-a-log-collected-from-mma-standalone\/","title":{"rendered":"Using the IntelliTrace Events window with a log collected from MMA Standalone"},"content":{"rendered":"<p>The <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2013\/09\/20\/introducing-microsoft-monitoring-agent.aspx\">Microsoft Monitoring Agent<\/a> allows you to collect reliability performance data and exception data for web applications. You can use IntelliTrace to review this data, or <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2014\/03\/07\/enhancements-to-debugging-exceptions-with-intellitrace-in-visual-studio-2013.aspx\">debug this data to get more useful information<\/a>. In this post I am using MMA Standalone, as opposed to MMA connected to AppInsights or System Center.<\/p>\n<p>One of my colleagues deployed <a href=\"http:\/\/fabrikam.codeplex.com\/\">FabrikamFiber<\/a> site to her local IIS and monitored it with MMA standalone. FabrikamFiber was designed to contain bugs and surprises. Let\u2019s see what we can find from the collected log (attached to the blog).<\/p>\n<p>Open the FabrikamFiber log file in Visual Studio and you\u2019ll see a summary page as following. It\u2019s complaining that some MVC pages have performance alerts and there are also quite a few exceptions. Note that all <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2014\/02\/11\/ui-enhancements-for-intellitrace-with-visual-studio-2013-update-2.aspx\">the exceptions and performance violations are nicely grouped<\/a>:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/1300.SummaryPage.png\" alt=\"\" border=\"0\" \/><\/p>\n<h2>Debugging an Exception Data<\/h2>\n<p>You can select an item in Exception Data then click the \u201cDebug Newest Exception in Group\u201d button to start debugging this exception. Once the debugger goes into break mode, you are immediately presented in the IntelliTrace window of all the IntelliTrace events collected by the MMA standalone sorted in time order. The expanded event corresponds to the exception that you just started debugging from.<\/p>\n<p>The way <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2014\/03\/07\/enhancements-to-debugging-exceptions-with-intellitrace-in-visual-studio-2013.aspx\">Microsoft Monitoring Agent<\/a> works is it monitors a web application in the background and collects data when undesirable behavior occurs, such as problematic exceptions or poor performance. The collected data includes information about various framework components such as System.XML, ADO.NET and ASP.NET. This information isn\u2019t visible on the IntelliTrace summary page but is available in the IntelliTrace window when debugging:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/3036.Event20View20after20Debugging20Exception.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>Each event in the list contains an event type and a short description. Currently the following types are supported by <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2013\/09\/20\/introducing-microsoft-monitoring-agent.aspx\">Microsoft Monitoring Agent<\/a>:<\/p>\n<ul>\n<li>Ado.NET<\/li>\n<li>ASP.NET<\/li>\n<li>Azure<\/li>\n<li>BizTalk<\/li>\n<li>Gesture<\/li>\n<li>Reporting Services<\/li>\n<li>Service Model<\/li>\n<li>SharePoint<\/li>\n<li>Performance<\/li>\n<li>Workflow<\/li>\n<li>Xml<\/li>\n<\/ul>\n<p>You can select an event to expand it and see additional information. An expanded event will contain a long description, a time stamp, as well as links to other debugger windows like the Locals window and the Call Stack window. In this case, the Locals window and the Call stack window will also be populated with data from the current event.<\/p>\n<p>For ADO.NET event, you can even click the link and open the event detail in SQL editor, the same as <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2014\/02\/10\/jump-to-sql-with-intellitrace.aspx\">Jump to SQL from performance detail view<\/a>:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/2313.Expanded20SQL20Event.png\" alt=\"\" border=\"0\" \/><\/p>\n<h2>How the IntelliTrace Events Window Helps Troubleshooting<\/h2>\n<p>Knowing what\u2019s in the IntelliTrace window, now let\u2019s see how to use this information to troubleshoot the 3 groups of exceptions on the summary page.<\/p>\n<p>Let\u2019s start from debugging the exception that happened most (58 occurrences as we saw on the Summary page):<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/1563.Issue201.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>The expanded event says *\u201cThe controller for path &#8216;\/FabrikamFiber.Web\/Content\/fonts\/segoewp-webfont.ttf&#8217; was not found or does not implement IController.\u201d *This is a bit confusing because there is no controller created for font files in FabrikamFiber. However if you are familiar with this ASP MVC error message, you\u2019ll realize that what the message really saying is it can\u2019t find the *segoewp-webfont.ttf *font file. After comparing the original code and published web site, it turned out that the font files were not published along with other binaries from my source code folder to the local IIS folder, and the web page failed to access the font files at runtime. I have to say that even though the error message isn\u2019t extremely intuitive, it\u2019s actually really helpful that MMA standalone reported this issue. Because the backup font is so similar to the missing one and it\u2019ll take me much longer time to notice that the font is off on published site without this message.<\/p>\n<p>Now let\u2019s debug the 2<sup>nd<\/sup> exception (5 occurrences) which is System.NullReferenceException:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/7823.Issue202-1.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>After digging a little bit, I noticed that the two events before this exception event both happened at same time (6:05 PM) as the exception event, and they point to Report.Employees page; which means it\u2019s very likely the NullReferenceException happened when generating the Employees page.<\/p>\n<p>Actually when the exception event is selected, the Call stack window and Locals window also clearly tell us that \u201cEmployeeReportViewModel.GetCustomerSummary\u201d function\u2019s \u201ccustomer\u201d parameter is null. With this information, I was able to fix the issue quickly later when I got access to the source code.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/2210.Issue202-2.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>And the understanding of the last issue is similar to the 2<sup>nd<\/sup> one, accessing ServiceTickets.Details page caused an ArgumentException.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/8372.Issue203.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>I\u2019m really glad that with the help of MMA Standalone log, I can easily find and fix these issues on a published site without live debugging the site.<\/p>\n<h2>Debugging a Performance Violation<\/h2>\n<p>For performance violation data, you can also open the <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2013\/09\/20\/performance-details-in-intellitrace.aspx\">performance detail view<\/a> and start debugging by clicking the \u201cDebug This Call\u201d link:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/3660.Start20Debugging20from20Performance20Detail20Page.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>Event better, note that when started from a performance violation item, you\u2019ll see a much shorter list of events because it is filtered to the events related to the current performance violation. You can read more on another blog post <a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2014\/03\/07\/enhancements-to-debugging-exceptions-with-intellitrace-in-visual-studio-2013.aspx\">how to troubleshoot from a performance alert<\/a>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2014\/04\/7610.Event20View20Filterd20by20Perf20Event.png\" alt=\"\" border=\"0\" \/><\/p>\n<h2>In Closing<\/h2>\n<p style=\"margin: 0in 0in 0pt\">\n  <span style=\"color: black;font-family: 'Calibri','sans-serif';font-size: 11pt\">We hope you find these features in the Visual Studio IntelliTrace experience for MMA Standalone-sourced IntelliTrace files useful. For feedback on this or any IntelliTrace feature, please ask us at our <\/span><a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/vstudio\/en-US\/home?forum=vsdebug\"><span style=\"font-family: 'Calibri','sans-serif';font-size: 11pt\">diagnostics MSDN forum<\/span><\/a><span style=\"color: black;font-family: 'Calibri','sans-serif';font-size: 11pt\">.<\/span>\n<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Components.PostAttachments\/00\/10\/51\/99\/84\/Default%20Web%20Site_FabrikamFiber.Web.itrace\">Default Web Site_FabrikamFiber.Web.itrace<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Microsoft Monitoring Agent allows you to collect reliability performance data and exception data for web applications. You can use IntelliTrace to review this data, or debug this data to get more useful information. In this post I am using MMA Standalone, as opposed to MMA connected to AppInsights or System Center. One of my [&hellip;]<\/p>\n","protected":false},"author":153,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1,225],"tags":[],"class_list":["post-1403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops","category-git"],"acf":[],"blog_post_summary":"<p>The Microsoft Monitoring Agent allows you to collect reliability performance data and exception data for web applications. You can use IntelliTrace to review this data, or debug this data to get more useful information. In this post I am using MMA Standalone, as opposed to MMA connected to AppInsights or System Center. One of my [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/1403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/153"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=1403"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/1403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=1403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=1403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=1403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}