Log static files RRS feed

  • Question

  • Hi

    I have a PHP application hosted in an Azure web app with Application Insights(AI) configured. I want AI to track requests to static files like ".js" or ".html" files but I don't see a way of doing it. It doesn't track requests to ".php" files either.


    Friday, April 26, 2019 9:36 AM

All replies

  • Hello, Yanis!  Thank you for using Application Insights.

    If you're looking to get telemetry from Application Insights on web pages, we have documentation that can get you started in the right direction using JavaScript:

    Application Insights for web pages

    Find out about the performance and usage of your web page or app. If you add Application Insights to your page script, you get timings of page loads and AJAX calls, counts and details of browser exceptions and AJAX failures, as well as users and session counts. All these can be segmented by page, client OS and browser version, geo location, and other dimensions. You can set alerts on failure counts or slow page loading. And by inserting trace calls in your JavaScript code, you can track how the different features of your web page application are used.

    Application Insights can be used with any web pages - you just add a short piece of JavaScript. If your web service is Java or ASP.NET, you can integrate telemetry from your server and clients.

    If you're looking to export your Application Insights telemetry to do some processing or conversion, you'll probably want to look at Continuous Export:

    Export telemetry from Application Insights

    Want to keep your telemetry for longer than the standard retention period? Or process it in some specialized way? Continuous Export is ideal for this. The events you see in the Application Insights portal can be exported to storage in Microsoft Azure in JSON format. From there you can download your data and write whatever code you need to process it.

    Before you set up continuous export, there are some alternatives you might want to consider:

    After Continuous Export copies your data to storage (where it can stay for as long as you like), it's still available in Application Insights for the usual retention period.

    Tuesday, April 30, 2019 3:18 AM