0

Is there a way to use Application Insights as a substitute for Web Server Logging? My end goal here is to analyze 4xxs and 5xxs.

Details:
-Right now, i only have the requests info for controllers/action where I manually used TrackRequest
-Web App hosted on Azure.
-SDK added as documents instruct.
-Other parts (SQL Dependency Tracking for example) work out-of-the-box

Leonardo
  • 10,737
  • 10
  • 62
  • 155
  • 1
    What do you mean? If you add it your web app it will log all requests and their status codes. So yes, you should be able to do some diagnosing. – Peter Bons Jun 06 '17 at 13:40
  • @PeterBons actually no... it's only logging the ones i'm creating via "TrackRequest"... – Leonardo Jun 06 '17 at 19:19
  • Where and how is your website ( I assume that is what it is) hosted? Can't you integrate application insights so you do not have to use the SDK? See https://learn.microsoft.com/en-us/azure/application-insights/app-insights-asp-net and https://learn.microsoft.com/en-us/azure/application-insights/app-insights-azure-web-apps. That way it will capture all info like exceptions and requests etc. – Peter Bons Jun 06 '17 at 19:22
  • @PeterBons check updates pls – Leonardo Jun 06 '17 at 20:05

1 Answers1

0

For some reason the web.config was missing:

<httpModules>
  <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
Leonardo
  • 10,737
  • 10
  • 62
  • 155