CustomEvents时间持续时间 [英] CustomEvents time duration

查看:109
本文介绍了CustomEvents时间持续时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,除了每个customevent的时间戳之外,我想查询哪个customevents花费了多少时间,想查看具有持续时间的customevents.

Hi , apart from timestamp of each customevent , i want to query which customevents took how much time , want to see customevents with duration they took to be happened.

假设,在请求中,我们可以使用

Suppose ,in requests ,we can see this using performanceBucket or duration.


谢谢!

WSBukhari

WSBukhari

推荐答案

WSBukhari,

Hi WSBukhari,

要查询自定义事件的持续时间,您首先需要使用SDK跟踪持续时间作为事件的度量标准.

In order to query the duration for custom events, you would need to first need to track the duration as a metric for the event using your SDK.

您可以按照下面的stackoverflow线程创建此类事件,然后对其进行跟踪:
https://stackoverflow.com/questions/28163352/timing-events-in-application-洞察力-天蓝色 

You can follow the below stackoverflow thread to create such an event and then track it:
https://stackoverflow.com/questions/28163352/timing-events-in-application-insight-azure 

一旦您跟踪了事件,就可以使用如下查询来查询它:

Once you have tracked your event, you can query it with a query like this:

customEvents
 | where name == "MyEvent" 
 | where timestamp >= ago(3d)
 | extend elapsed = customMeasurements.["Elapsed"]    
 | summarize avgelapsed = avg(todouble(elapsed)) by version = application_Version
 | order by avgelapsed desc

有关更多信息,请参见以下文档
https://docs.microsoft.com/zh-我们/azure/azure-monitor/app/api-custom-events-metrics#trackevent

For more information you can look at the below documentation around it
https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#trackevent

希望这会有所帮助!


这篇关于CustomEvents时间持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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