以秒为单位显示自定义指标图表值 [英] Display custom metric chart value in seconds

查看:141
本文介绍了以秒为单位显示自定义指标图表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Application Insights跟踪自定义性能指标,并将代表毫秒的原始数值发送到Azure.我正在通过JS SDK进行操作:appInsights.trackMetric(name,value)

I am using Application Insights to track custom performance metric and sending raw numeric value representing milliseconds to Azure. I am doing it via JS SDK: appInsights.trackMetric(name, value)

我在Azure Portal中的查询如下:

My query in Azure Portal looks like this:

customMetrics 
| where name == 
"InitialPageLoadWithFeed"
| render timechart 

推荐答案

摘要

您可以使用 扩展运算符以创建计算列并将其附加到结果集,从而使您可以将Y轴或X轴的值修改为更有意义的内容.

You can use the extend operator to create calculated columns and append them to the result set, allowing you to modify the Y axis or X axis values into something that makes more sense.

说明

如果要在 演示站点,您会看到类似这样的内容:

If you were to try the following query on the demo site, you'd see something like this:

customMetrics 
| where name == "Customer Lead Time"
| render timechart


在上面的时间图中,Y轴是值".并且X轴是时间戳". (可以使用下拉箭头将其更改为使用不同的值).如果值显示秒数,您将怎么办? 显示分钟?

In the above time chart, the Y axis is "value" and the X axis is "timestamp" (which can be changed to use different values using the dropdown arrows).  What would you do if value was showing seconds and what you really wanted to display were minutes?

扩展运算符允许您修改显示的值:

The extend operator allows you to modify the values shown:

customMetrics
| extend value = value/60
| where name == "Customer Lead Time"
| render timechart







这篇关于以秒为单位显示自定义指标图表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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