Exceptions are not displayed in applications

We have just installed Application Insights on our server.

Everything seems to work fine, but server-side exceptions are not showing up in the portal.

We log exceptions with our custom tool, but we wanted to see them in AI as well, especially raw ones.

This is a simple installation of the AI โ€‹โ€‹agent on Windows Server 2012.

ApplicationInsigts.confg:

<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">
  <!-- 
    Learn more about Application Insights configuration with ApplicationInsights.config here: 
    http://go.microsoft.com/fwlink/?LinkID=392530
  -->
  <TelemetryChannel>
    <DeveloperMode>false</DeveloperMode>
  </TelemetryChannel>
  <TelemetryModules>
    <Add Type="Microsoft.ApplicationInsights.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebRequestTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebExceptionTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebSessionTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.RequestTracking.TelemetryModules.WebUserTrackingTelemetryModule, Microsoft.ApplicationInsights.Web" />
    <Add Type="Microsoft.ApplicationInsights.RuntimeTelemetry.RemoteDependencyModule, Microsoft.ApplicationInsights.RuntimeTelemetry" />
    <Add Type="Microsoft.ApplicationInsights.RuntimeTelemetry.ApmcModule, Microsoft.ApplicationInsights.RuntimeTelemetry" />
  </TelemetryModules>
  <ContextInitializers>
    <Add Type="Microsoft.ApplicationInsights.Contexts.ComponentContextInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.DeviceContextInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Web.AzureRoleEnvironmentContextInitializer, Microsoft.ApplicationInsights.Web" />
  </ContextInitializers>
  <TelemetryInitializers>
    <Add Type="Microsoft.ApplicationInsights.Core.TimestampPropertyInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.NetBiosMachineNameTelemetryInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.OperatingSystemTelemetryInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.ProcessIdTelemetryInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.ProcessNameTelemetryInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.ThreadIdTelemetryInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Contexts.ThreadLanguageTelemetryInitializer, Microsoft.ApplicationInsights" />
    <Add Type="Microsoft.ApplicationInsights.Web.TelemetryInitializers.WebOperationNameTelemetryInitializer, Microsoft.ApplicationInsights.Web" />
    <Add Type="Microsoft.ApplicationInsights.Web.TelemetryInitializers.WebOperationIdTelemetryInitializer, Microsoft.ApplicationInsights.Web" />
  </TelemetryInitializers>
  <InstrumentationKey>....</InstrumentationKey>
  <ResourceID>.....</ResourceID>
  <StatusMonitor>0.10.0-build23829</StatusMonitor>
</ApplicationInsights>

      

enter image description here

+3


source to share


2 answers


There is a blog post that outlines what's going to be built out of the box and what you need to do in other cases: http://blogs.msdn.com/b/visualstudioalm/archive/2014/12/12/application-insights-exception -telemetry.aspx



+1


source


The AI โ€‹โ€‹won't see any exceptions that you might have handled in any global exception handlers. I suspect this may contribute to what you find. If you are using global exception handlers, you can use the TrackException from the AI โ€‹โ€‹SDK in the handler, which will then send them to the AI.



+1


source







All Articles