locked
Application Insight displaying Handled Exceptions too. RRS feed

  • Question

  • User1140095199 posted

    Hi Guys!

    Here is the issue. Which kind of mislead us and bothered the whole team.

    We are using Azure Cloud with Web Role and Worker Role running.

    We configured Visual Studio Online / Application Insight to monitor performance. Recently we saw lot of Exceptions in the application.

    After wasting a lot of time and energy we found that the Exceptions are already handled but they are still being displayed in here.

    It is kind of bothering, Can someone guide us on how to display only UNHANDLED exceptions. Rest handled Exceptions should be ignored by Application Insight.

    UPDATE:

    I am using Azure PaaS Application Insight:

    Not sure were I can configure it to restrict from Adding info about Handled Exceptions!

    Regards,

    Sam

    Wednesday, April 15, 2015 10:36 PM

Answers

  • User1140095199 posted

    Hi Guys!

    I solved the puzzle finally!

    Firstly, Microsoft VSO Application Insight comes with limited Preview so it is not possible to customize it too much. But there is ApplicationInsight.config file which is created in the siteroot along with the web.config file in the Cloud Instance. You have to login to the Cloud instance and locate the file. In my case it was inside the location :

    E:\sitesroot\0

    Open this file and with your favorite text editor and find the segment below:

     <!-- Specify whether to log caught exceptions.
                false = Log exceptions that are handled by the standard ASP.NET handlers,
                        and by your handlers specified in <ExceptionHandlers>.
                true =  Log all exceptions in the instrumented namespaces that cross a method boundary. -->
     <EnableAllExceptions>true</EnableAllExceptions>

    This section specifies whether to log caught Exceptions. By default it set to true. Set it to false ! Restart the Monitoring Services through services.msc

    Services to Restarted:

    Microsoft Monitoring Agent and Microsoft Monitoring Agent APM

    Secondly , Microsoft is going to retire VSO Application Insight. Instead it recommends to use Application Insight with Azure Portal:

    Application Insights: Moving from Visual Studio Online Portal to Azure Preview Portal

    "Today we are announcing an update to our policy for Application Insights on the Visual Studio Online portal. If you are already using Application Insights on the Visual Studio Online portal, you can continue to do so without any effect. However starting in mid-February, for users new to Application Insights, there will no longer be the option of using Application Insights in the Visual Studio Online portal. Instead, these customers should be using the Azure Preview portal. If you already have an account with Application Insights in Visual Studio Online, it will continue to work and you can add new applications. The only visible difference will be a banner encouraging users to try Application Insights in the Azure Preview portal.

    We will switch off Applications Insights in the Visual Studio Online portal in mid-2015. By then, all customers should have moved to Application Insights in the Azure Preview Portal."

    We are planning to move to Azure Portal AppInsights .

    UPDATE:

    There might be a case in which the changes might still not work. In that case please restart the MMA Monitoring for WebSite. Use the MMA Powershell and type the following commands:

    SYNTAX
        Start-WebApplicationMonitoring [-Cloud] [<SwitchParameter>] [-Name] <String
        > [-SkipIISReset] [-Confirm] [-WhatIf] [<CommonParameters>]
    
        Start-WebApplicationMonitoring [-Local] [<SwitchParameter>] [-Name] <String
        > -OutputPath <String> [-CollectionPlan <String>] [-SkipIISReset] [-Confirm
        ] [-WhatIf] [<CommonParameters>]

    If you are using a different version and the above commands do not work correctly. You may use powershell help commands:

    >get-help Start-WebApplicationMonitoring

    >get-help Start-WebApplicationMonitoring -examples

    Best Regards,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 22, 2015 2:39 AM

All replies

  • User1814019480 posted

    hi Sam,

    Currently, It seem that Application insight has integrated to Azure preview portal. You can use this feature on portal.azure.com and see this tutorials (http://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/) . About this VSO and application insight issue, I recommend you can post on Azure MSDN VSO forum for more helps and better support.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=TFService

    Any questions, please feel free to let me know :)

    Regards,

    Will

    Monday, April 20, 2015 2:21 AM
  • User1140095199 posted

    Well Will,

    Perhaps you missed out the basic part of the Issue. I have ApplicationInsight already configured. That's not my issues. I am looking for a solution on how to display only Unhandled Exception if you are using UnifiedBootstrap for ApplicationInsight because it is displaying Handled Exception which we don't want! Or at least on how we can change this Exceptions to Warnings as they are already handled!

    Anyway, I have posted this issues to the Azure MSDN VSO Forum as recommended by you!

    -Regards,

    Sam

    Monday, April 20, 2015 9:43 PM
  • User1140095199 posted

    Hi Guys!

    I solved the puzzle finally!

    Firstly, Microsoft VSO Application Insight comes with limited Preview so it is not possible to customize it too much. But there is ApplicationInsight.config file which is created in the siteroot along with the web.config file in the Cloud Instance. You have to login to the Cloud instance and locate the file. In my case it was inside the location :

    E:\sitesroot\0

    Open this file and with your favorite text editor and find the segment below:

     <!-- Specify whether to log caught exceptions.
                false = Log exceptions that are handled by the standard ASP.NET handlers,
                        and by your handlers specified in <ExceptionHandlers>.
                true =  Log all exceptions in the instrumented namespaces that cross a method boundary. -->
     <EnableAllExceptions>true</EnableAllExceptions>

    This section specifies whether to log caught Exceptions. By default it set to true. Set it to false ! Restart the Monitoring Services through services.msc

    Services to Restarted:

    Microsoft Monitoring Agent and Microsoft Monitoring Agent APM

    Secondly , Microsoft is going to retire VSO Application Insight. Instead it recommends to use Application Insight with Azure Portal:

    Application Insights: Moving from Visual Studio Online Portal to Azure Preview Portal

    "Today we are announcing an update to our policy for Application Insights on the Visual Studio Online portal. If you are already using Application Insights on the Visual Studio Online portal, you can continue to do so without any effect. However starting in mid-February, for users new to Application Insights, there will no longer be the option of using Application Insights in the Visual Studio Online portal. Instead, these customers should be using the Azure Preview portal. If you already have an account with Application Insights in Visual Studio Online, it will continue to work and you can add new applications. The only visible difference will be a banner encouraging users to try Application Insights in the Azure Preview portal.

    We will switch off Applications Insights in the Visual Studio Online portal in mid-2015. By then, all customers should have moved to Application Insights in the Azure Preview Portal."

    We are planning to move to Azure Portal AppInsights .

    UPDATE:

    There might be a case in which the changes might still not work. In that case please restart the MMA Monitoring for WebSite. Use the MMA Powershell and type the following commands:

    SYNTAX
        Start-WebApplicationMonitoring [-Cloud] [<SwitchParameter>] [-Name] <String
        > [-SkipIISReset] [-Confirm] [-WhatIf] [<CommonParameters>]
    
        Start-WebApplicationMonitoring [-Local] [<SwitchParameter>] [-Name] <String
        > -OutputPath <String> [-CollectionPlan <String>] [-SkipIISReset] [-Confirm
        ] [-WhatIf] [<CommonParameters>]

    If you are using a different version and the above commands do not work correctly. You may use powershell help commands:

    >get-help Start-WebApplicationMonitoring

    >get-help Start-WebApplicationMonitoring -examples

    Best Regards,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 22, 2015 2:39 AM