As you may have noticed, this site uses Wyam as a static site generator to produce what you see here from a set of .md Markdown files checked into a Git repository.
The site is hosted on Azure Web Apps which is basically IIS under-the-hood.
There are some little tricks in the web.config file to make this work properly. Which you can find more info on the Azure hosting Wyam documentation page.
Enabling Application Insights for Static Content
If you are using Azure Web Apps. Add the Applications Insights Extension to the Web App. This will add the proper DLLs to the Bin directory of your site.
Add the following code to your
<configuration> <system.webServer> <modules runAllManagedModulesForAllRequests="true"> <remove name="ApplicationInsightsWebTracking"/> <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler"/> </modules> </system.webServer> </configuration>
The key difference in this code compared to the Application Insights default settings is the
runAllManagedModulesForAllRequests="true"flag on the Modules configuration.
And you are done! You should now see some server side telemetry for .png or .js requests in your Application Insights portal.
Thanks for reading.