0
votes

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

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
@PeterBons actually no... it's only logging the ones i'm creating via "TrackRequest"... - Leonardo
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 docs.microsoft.com/en-us/azure/application-insights/… and docs.microsoft.com/en-us/azure/application-insights/…. That way it will capture all info like exceptions and requests etc. - Peter Bons
@PeterBons check updates pls - Leonardo

1 Answers

0
votes

For some reason the web.config was missing:

<httpModules>
  <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>