【App Service】解决 .NET Profiler 报告打开后无数据加载的问题

简介: 【App Service】解决 .NET Profiler 报告打开后无数据加载的问题

问题描述

App Service上可以收.NET 应用的Profile Trace文件,并且可以自动分析报告。

Collect a Profiler Trace

If your app is down or performing slow, you can collect a profiling trace to identify the root cause of the issue. Profiling is light weight and is designed for production scenarios.

What you should know before collecting a Profiler trace

  • Once the profiler trace is started, reproduce the issue by browsing to the web app.
  • The profiler trace will automatically stop after 60 seconds.
  • If thread report option is enabled, then raw stack traces of threads inside the process will be collected as well.
  • With thread report option, your App may be paused for a few seconds till all the threads are dumped.
  • Your web app will not be restarted as a result of running the profiler.
  • A profiler trace will help to identify issues in an ASP.NET or ASP.NET Core application.

只是,查看的报告中,所以数据均无法显示,如下图:

如何来解决这个问题呢?

 

问题解答

在报告页面中打开“开发者模式”,查看Console日志或者是Networks日志,发现问题是因为 js /css 文件无法访问导致。

GET https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js net::ERR_CONNECTION_TIMED_OUT

因为中国区Azure所部署的位置位于北京,上海区域。所以无法正常访问 Google API,无法直接获取 angular.min.js 资源。所以可以通过修改html的 js应用路径来解决问题。

第一步:找到一个在中国区Azure可以访问的 1.2.15 版本的 angular.min.js

可以使用 https://cdn.bootcdn.net/ajax/libs/angular.js/1.2.15/angular.min.js 替换 https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js 

第二步:打开App Service的Kudu站点,进入DebugConsole

寻找 Data/DaaS/Reports/240701_1119225346/240701_1121184125/dw0sdwk00002D/index.html 文件,  然后编辑。 注意 “/240701_1119225346/240701_1121184125/dw0sdwk00002D/” 这部分内容会根据具体的时间,实例名发生变动。

第三步:在HTML文件种替换 angular.min.js

## 把 
 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
## 替换为
 <script src="https://cdn.bootcdn.net/ajax/libs/angular.js/1.2.15/angular.min.js"></script>

 

再次打开 Profiler Report 页面,加载数据成功!

 

参考资料

Angular JS: https://www.bootcdn.cn/angular.js/

Collect .NET Profiler Trace : https://appserviceblog.com/en/collect-net-profiler-trace/

App Service Diagnostics – Profiling an ASP.NET Web App on Azure App Service : https://azure.github.io/AppService/2018/06/06/App-Service-Diagnostics-Profiling-an-ASP.NET-Web-App-on-Azure-App-Service.html

目录
打赏
0
0
0
0
194
分享
相关文章
【Azure App Service】基于Linux创建的App Service是否可以主动升级内置的Nginx版本呢?
基于Linux创建的App Service是否可以主动升级内置的Nginx版本呢?Web App Linux 默认使用的 Nginx 版本是由平台预定义的,无法更改这个版本。
133 77
|
1月前
|
【Azure App Service】对App Service中CPU指标数据中系统占用部分(System CPU)的解释
在Azure App Service中,CPU占比可在App Service Plan级别查看整个实例的资源使用情况。具体应用中仅能查看CPU时间,需通过公式【CPU Time / (CPU核数 * 60)】估算占比。CPU百分比适用于可横向扩展的计划(Basic、Standard、Premium),而CPU时间适用于Free或Shared计划。然而,CPU Percentage包含所有应用及系统占用的CPU,高CPU指标可能由系统而非应用请求引起。详细分析每个进程的CPU占用需抓取Windows Performance Trace数据。
99 40
|
3月前
|
App加载页面的等待体验设计技巧
App加载页作为整个用户体验的一部分,直接影响用户对于产品服务的忠诚度和满意度。
78 13
|
3月前
|
【Azure App Service】在App Service for Windows上验证能占用的内存最大值
根据以上测验,当使用App Service内存没有达到预期的值,且应用异常日志出现OutOfMemory时,就需要检查Platform的设置是否位64bit。
67 11
【Azure Bot Service】部署NodeJS ChatBot代码到App Service中无法自动启动
2024-11-12T12:22:40.366223350Z Error: Cannot find module 'dotenv' 2024-11-12T12:40:12.538120729Z Error: Cannot find module 'restify' 2024-11-12T12:48:13.348529900Z Error: Cannot find module 'lodash'
63 11
【Azure App Service】部署在App Service上的.NET应用内存消耗不能超过2GB的情况分析
x64 dotnet runtime is not installed on the app service by default. Since we had the app service running in x64, it was proxying the request to a 32 bit dotnet process which was throwing an OutOfMemoryException with requests >100MB. It worked on the IaaS servers because we had the x64 runtime install
【Azure App Service】在App Service中调用Stroage SDK上传文件时遇见 System.OutOfMemoryException
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
【Azure App Service】在App Service上关于OpenSSH的CVE2024-6387漏洞解答
CVE2024-6387 是远程访问漏洞,攻击者通过不安全的OpenSSh版本可以进行远程代码执行。CVE-2024-6387漏洞攻击仅应用于OpenSSH服务器,而App Service Runtime中并未使用OpenSSH,不会被远程方式攻击,所以OpenSSH并不会对应用造成安全风险。同时,如果App Service的系统为Windows,不会受远程漏洞影响!
|
3月前
|
C#
【Azure App Service】使用Microsoft.Office.Interop.Word来操作Word文档,部署到App Service后报错COMException
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).

热门文章

最新文章

  • 1
    MNN-LLM App:在手机上离线运行大模型,阿里巴巴开源基于 MNN-LLM 框架开发的手机 AI 助手应用
    231
  • 2
    原生鸿蒙版小艺APP接入DeepSeek-R1,为HarmonyOS应用开发注入新活力
    24
  • 3
    【11】flutter进行了聊天页面的开发-增加了即时通讯聊天的整体页面和组件-切换-朋友-陌生人-vip开通详细页面-即时通讯sdk准备-直播sdk准备-即时通讯有无UI集成的区别介绍-开发完整的社交APP-前端客户端开发+数据联调|以优雅草商业项目为例做开发-flutter开发-全流程-商业应用级实战开发-优雅草Alex
    12
  • 4
    【08】flutter完成屏幕适配-重建Android,增加GetX路由,屏幕适配,基础导航栏-多版本SDK以及gradle造成的关于fvm的使用(flutter version manage)-卓伊凡换人优雅草Alex-开发完整的社交APP-前端客户端开发+数据联调|以优雅草商业项目为例做开发-flutter开发-全流程-商业应用级实战开发-优雅草Alex
    24
  • 5
    【Azure App Service】基于Linux创建的App Service是否可以主动升级内置的Nginx版本呢?
    7
  • 6
    【Azure Function】Function App出现System.IO.FileNotFoundException异常
    1
  • 7
    【Azure Logic App】使用MySQL 新增行触发器遇见错误 :“Unknown column 'created_at' in 'order clause'”
    4
  • 8
    1688APP 原数据 API 接口的开发、应用与收益
    10
  • 9
    PiliPala:开源项目真香,B站用户狂喜!这个开源APP竟能自定义主题+去广告?PiliPala隐藏功能大揭秘
    13
  • 10
    APP-国内主流安卓商店-应用市场-鸿蒙商店上架之必备前提·全国公安安全信息评估报告如何申请-需要安全评估报告的资料是哪些-优雅草卓伊凡全程操作
    5