Azure Monitor的“响应时间"和AppInsights的“持续时间"有什么区别? [英] What is the difference between Azure Monitor 'Response time' and AppInsights 'Duration'?

查看:68
本文介绍了Azure Monitor的“响应时间"和AppInsights的“持续时间"有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么Azure监视器中的平均响应时间"指标不总是与Application Insights响应时间匹配吗?

Does anyone know why the 'Average response time' metric in Azure monitor doesn't always match up to the Application Insights response time?

是因为采样吗?

例如,以下是我从Azure应用服务中获取的一些统计信息:

For example, here's some stats i pulled from my Azure App Service:

..以及AppInsights中的相应统计信息:

..and the corresponding stats in AppInsights:

所以有凹凸..但是差别很大.

So the bumps are there.. but the difference is huge.

有区别吗?如果是这样,它们是什么?我到处都找不到文档.

Is there a difference? If so, what are they? I haven't been able to find documentation anywhere.

谢谢.

推荐答案

两者 Azure监视将这些指标定义为您的应用响应请求所需的时间.Dmitry正确地指出,差异主要是由于服务正在监视哪个过程.Azure监控正在整个Web服务器上收集统计信息.这就是为什么它除了报告响应时间外还报告CPU和内存使用情况的原因.另一方面,Application Insights内置在您的代码中,因此它只能告诉您代码运行了多长时间.它不知道您使用了多少CPU,但是它可以告诉您有关代码的信息,例如数据库调用花费了多长时间.因此,我希望应用程序服务报告的数量比App Insights高.

Both Azure Monitoring and Application Insights define these metrics as how long it takes your app to respond to requests. Dmitry correctly noted that the difference is primarily because of what piece of the process the service is monitoring. Azure Monitoring is gathering statistings on the web server as a whole. That's why it is reporting on CPU and memory usage in addition to response times. On the other hand, Application Insights is built into your code, so it can only tell you how long your code took to run. It doesn't know how much of the CPU you are using, but it can tell you things about your code, like how long a database call took. For this reason I would expect the app service to report a higher number than App Insights.

采样可能不会对差异产生重大影响-至少您不会期望该差异随着时间的推移如此一致.绝对可以产生影响的一件事是,如果同一应用程序服务上有多个应用程序.Azure Monitor正在查看服务上的所有应用程序,而Application Insights仅查看该一个应用程序.

Sampling probably won't have a significant impact on the difference- at the very least you wouldn't expect that difference to be so consistant over time. One thing that can definitely have an impact is if you have multiple apps on the same app service. Azure Monitor is looking at all the apps on the service, whereas Application Insights is only looking at that one app.

这篇关于Azure Monitor的“响应时间"和AppInsights的“持续时间"有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆