记录静态文件 [英] Log static files
问题描述
您好
我在配置了Application Insights(AI)的Azure Web应用程序中托管了一个PHP应用程序。我希望AI跟踪对静态文件的请求,例如".js"。或".html"文件,但我没有看到这样做的方法。它不跟踪对".php"的请求。
文件。
谢谢
您好,Yanis! 感谢您使用Application Insights。
如果您希望从网页上的Application Insights获取遥测,我们提供的文档可以帮助您使用JavaScript开始正确的方向:
网页的应用洞察
https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript
了解性能和您的网页或应用程序的使用。如果您添加了 Application Insights 在页面脚本中,您可以获得页面加载的时间
和AJAX调用,浏览器异常和AJAX失败的计数和详细信息,以及用户和会话计数。所有这些都可以按页面,客户端操作系统和浏览器版本,地理位置和其他维度进行细分。您可以设置故障计数警报或
慢页面加载。通过在JavaScript代码中插入跟踪调用,您可以跟踪如何使用网页应用程序的不同功能。
Application Insights可用于任何网页 - 您只需添加一小段JavaScript。如果您的网络服务是 Java ;或者 ASP.NET ,
您可以整合来自服务器和客户的遥测。
如果您正在寻找导出您的Application Insights遥测以进行一些处理或转换,您可能希望查看持续导出:
从Application Insights导出遥测
https://docs.microsoft.com/en -us / azure / azure-monitor / app / export-telemetry
想要让您的遥测时间超过标准保留期吗?或者以某种专门的方式处理它?持续出口是理想的选择。您在Application Insights门户中看到的事件可以以JSON
格式导出到Microsoft Azure中的存储。从那里你可以下载你的数据并编写你需要的任何代码来处理它。
在设置连续导出之前,您可能需要考虑一些替代方案:
指标或搜索刀片顶部的"导出"按钮可让您传输表格和图表到Excel电子表格。
Google Analytics 为遥测提供了强大的查询语言。它也可以导出结果。
如果你'重新关注在Power BI中探索您的数据,您可以在不使用持续导出的情况下执行此操作。
数据访问REST API 可让您以编程方式访问遥测。
您还可以访问设置 通过Powershell连续导出。
After持续导出将您的数据复制到存储(可以在任何时间内保留),它仍然可以在Application Insights中用于常规 保留
期限。
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.
Thanks
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
https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript
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
https://docs.microsoft.com/en-us/azure/azure-monitor/app/export-telemetry
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:
The Export button at the top of a metrics or search blade lets you transfer tables and charts to an Excel spreadsheet.
Analytics provides a powerful query language for telemetry. It can also export results.
If you're looking to explore your data in Power BI, you can do that without using Continuous Export.
The Data access REST API lets you access your telemetry programmatically.
You can also access setup continuous export via Powershell.
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.
这篇关于记录静态文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!