首页 > 其他分享 >【App Service】解决 .NET Profiler 报告打开后无数据加载的问题

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

时间:2024-07-01 20:34:57浏览次数:1  
标签:Service App js NET Profiler angular

问题描述

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

 

标签:Service,App,js,NET,Profiler,angular
From: https://www.cnblogs.com/lulight/p/18278749

相关文章

  • Could not recover RibbonLoadBalancerClient.choose ServiceInstance
    org.springframework.retry.TryException:Couldnotrecover;nestedexceptionisjava.lang.AbstractMethodError:org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose(Ljava/lang/String;Lorg/springframework/cloud/client/loadbalancer/Request;......
  • iPhone苹果手机iOS18如何隐藏打开APP怎么找出来恢复隐藏APP?
    iPhone苹果手机如何隐藏APP?1、iPhone苹果手机上一些APP不想让别人看到可以设置为隐藏APP,请长按要设置隐藏的APP,选择需要面容ID;2、然后再接着选择隐藏并需要面容ID,选择后手机桌面将不在显示该APP;iPhone苹果手机隐藏APP怎么打开?1、滑动苹果iPhone手机到最后一屏的APP......
  • Appium+python自动化(三十三)- 本地调试测试代码,远程控制测试环境-Remote(超详解)
    简介在前边所有涉及启动app的时候有这样一行代码driver=webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps),很多小伙伴们和同学们不知道这个ip和端口哪里来的,我觉得有必要给小伙伴解释一下,于是宏哥决定写一篇关于这个appium的服务器ip文章!来给大家答答疑......
  • 如何使用 Services.AddDistributedMemoryCache
    参考资料:https://www.cnblogs.com/RainFate/p/16920591.html AI生成:在.NETCore中,Services.AddDistributedMemoryCache()方法用于注册分布式内存缓存。这是一个内存中的缓存解决方案,适用于需要在多个服务器或服务之间共享缓存数据的分布式系统。如何使用AddDistributedMemory......
  • 中文翻译老挝语只推荐一个神器《老挝语翻译通》App,老挝语口语发音练习,支持老挝文OCR识
    出国旅游去探索东南亚的神秘国家:老挝,不会老挝语怎么办?不用怕,下载《老挝语翻译通》App帮助你把中文翻译成老挝语。功能亮点:实时翻译:实时把中文翻译成老挝语,老挝语单词或者句子均可均可准确翻译。语音识别翻译:无需打字,对着说话就能翻译,老挝语实时对话,流畅交流。OCR文字识别:......
  • 直播电商APP源码
            你有没有想过,如何通过手机就能够触手可及地购买到你想要的商品呢?直播电商APP源码,为你带来了全新的购物体验。它不仅为用户提供了便捷快速的购物平台,还为商家提供了一个高效的销售渠道。武汉迅狐科技有限公司研发的直播电商APP源码,打破了传统电商模......
  • 没有MAC电脑,如何申请苹果开发证书、上架APP Store?
    【引言】使用uni-app进行跨平台APP开发时,苹果ios平台最终还是要通过APPStore渠道发布,调试时uni-app基座也必须使用开发者证书签名后才能安装。对于使用MAC电脑的开发者,倒也不存在什么大障碍,照着文档操作就行,但是对于不使用MAC电脑,身边也没有MAC电脑,采购预算又紧张的开发者和团......
  • DWA(Dynamic Window Approach)局部路径规划算法详解及代码实现
    DWA(Dynamic Window Approach)局部路径规划算法详解及代码实现二、算法原理一句话概况,就是假定机器人当前以若干组容许范围内的速度(差速轮为例:线速度V,角速度W)进行移动,并对这若干组速度进行轨迹计算,得到若干组轨迹,再根据若干条评分机制选择最好的轨迹所对应的速度作为dwa输......
  • Azure Function App With Python 3.11
    有一段python代码,原来都跑在本地,既然functionapp可以运行python,还是比较新的python3.11,就想着直接用functionapp来跑了,省的进行sql逻辑改造,并且不吹不黑,python的pandas在处理dataframe上非常灵活。想法是好的,本地VSCODE搭起来python运行环境也很快,直接AZsignin就部署到自己......
  • uni-app编译错误:“hasInjectionContext“ is not exported by “node_modules/.pnpm/p
    1.问题背景当我们接手一个新的uni-app项目(最头疼了x_x),可能会想到删掉node_modules和pnpm-lock.yaml后,执行npminstall或npminstall重新安装依赖包,然后执行pnpmdev:mp-weixin编译,但可能会遇到如下错误:"hasInjectionContext"isnotexportedby"node_modul......