【应用程序见解 Application Insights】在Application Insights中通过自定义查询结果定义指标并显示在Dashboard中
问题情形
通过Application Insights收集到指标数据后,如Request,Trace,Exception。但是默认的Insights图表不能满足业务的需求,需要自定义相应的类SQL语句并制作图表以便直观的显示,避免每次都需要重新查询数据并转换为图表。
类SQL的查询语句在Applicaiton Insights示例为:
// Response time trend
// Chart request duration over the last 12 hours.
requests
| where timestamp > ago(12h)
| summarize avgRequestDuration=avg(duration) by bin(timestamp, 10m) // use a time grain of 10 minutes
| render timechart // Operations performance
// Calculate request count and duration by operations.
requests
| summarize RequestsCount=sum(itemCount), AverageDuration=avg(duration), percentiles(duration, 50, 95, 99) by operation_Name // you can replace 'operation_Name' with another value to segment by a different property
| order by RequestsCount desc // order from highest to lower (descending) // Top 10 countries by traffic
// Chart the amount of requests from the top 10 countries.
requests
| summarize CountByCountry=count() by client_CountryOrRegion
| top 10 by CountByCountry
| render piechart // Top 3 browser exceptions
// What were the highest reported exceptions today?
exceptions
| where notempty(client_Browser) and client_Type == 'Browser'
| summarize total_exceptions = sum(itemCount) by problemId
| top 3 by total_exceptions desc // Failed requests – top 10
// What are the 3 slowest pages, and how slow are they?
requests
| where success == false
| summarize failedCount=sum(itemCount) by name
| top 10 by failedCount desc
| render barchart // Failed operations
// Calculate how many times operations failed, and how many users were impacted.
requests
| where success == false
| summarize failedCount=sum(itemCount), impactedUsers=dcount(user_Id) by operation_Name
| order by failedCount desc
操作步骤
Application Insights提供了非常简单的办法来完成制作图表的步骤,只需要在Logs页面中,按照上面的类SQL语句写好后,点击右上角的固定到仪表盘(Pin To Dashboard)即可。

参考资料:
创建诊断设置以在 Azure 中收集资源日志和指标:https://docs.azure.cn/zh-cn/azure-monitor/platform/diagnostic-settings
【应用程序见解 Application Insights】在Application Insights中通过自定义查询结果定义指标并显示在Dashboard中的更多相关文章
- Java连接MySQL数据库。编写一个应用程序,在主类Test_4类中,通过JDBC访问stu数据库,显示t_student表中的内容(表结构见表1),显示效果自己设计。
题目2:编写一个应用程序,在主类Test_4类中,通过JDBC访问stu数据库,显示t_student表中的内容(表结构见表1),显示效果自己设计.之后,可根据显示的内容进行某条记录的删除(以id为条 ...
- 【应用程序见解 Application Insights】Application Insights 使用 Application Maps 构建请求链路视图
Applicaotn Insigths 使用 Application Maps 构建请求链路视图 构建系统时,请求的逻辑操作大多数情况下都需要在不同的服务,或接口中完成整个请求链路.一个请求可以经历 ...
- 【Azure 应用程序见解】Application Insights Java Agent 3.1.0的使用实验,通过修改单个URL的采样率来减少请求及依赖项的数据采集
问题描述 近日好消息,如果是一个Java Spring Cloud的项目,想使用Azure Applicaiton Insights来收集日志及一些应用程序见解.但是有不愿意集成SDK来修改代码或者配 ...
- 【转】VS2012编译出来的程序,在XP上运行,出现“.exe 不是有效的 win32 应用程序” “not a valid win32 application”
原文网址:http://www.cnblogs.com/Dageking/archive/2013/05/15/3079394.html VS2012编译出来的程序,在XP上运行,出现“.exe 不是 ...
- Android清单文件具体解释(三)----应用程序的根节点<application>
<application>节点是AndroidManifest.xml文件里必须持有的一个节点,它包括在<manifest>节点下.通过<application>节 ...
- 【IOS6.0 自学瞎折腾】(五)应用程序的启动过程和Application生命周期
一 :main函数入口 看下项目资源结构,其实程序的入口也是在main.m里面. #import <UIKit/UIKit.h> #import "BvinAppDelegate ...
- ios 程序发布使用xcode工具Application Loader 正在通过ITUNES STORE进行鉴定错误
ios 程序发布使用xcode工具Application Loader 正在通过ITUNES STORE进行鉴定错误 一:此错误会导致上传程序,一直停留在验证阶段,而没有一点上传进度:结果会苦等半天, ...
- 错误: 在类 Main 中找不到 main 方法, 请将 main 方法定义为: public static void main(String[] args) 否则 JavaFX 应用程序类必须扩展javafx.application.Application
错误: 在类 Main 中找不到 main 方法, 请将 main 方法定义为: public static void main(String[] args)否则 JavaFX 应用程序类必须扩展ja ...
- 关于C++程序运行程序是出现的this application has requested the runtime to terminate it in an unusual way. 异常分析
今天运行程序是出现了this application has requested the runtime to terminate it in an unusual way. 的异常报告,以前也经常 ...
随机推荐
- Spring Boot 如何使用拦截器、过滤器、监听器?
过滤器 过滤器的英文名称为 Filter, 是 Servlet 技术中最实用的技术. 如同它的名字一样,过滤器是处于客户端和服务器资源文件之间的一道过滤网,帮助我们过滤掉一些不符合要求的请求,通常用作 ...
- mysql优化的常用方法
mysql的优化,大体分为三部分:索引的优化,sql语句的优化,表的优化 1.索引的优化 只要列中含有NULL值,就最好不要在此列设置索引,复合索引如果有NULL值,此列在使用时也不会使用索引 尽量使 ...
- Docker应用安装
一.安装mysql 1.查看可用的 MySQL 版本 访问 MySQL 镜像库地址:https://hub.docker.com/_/mysql?tab=tags . 可以通过 Sort by 查看其 ...
- selenium的文档API
你用WebDriver要做的第一件事就是指定一个链接,一般我们使用get方法: from selenium import webdriver from selenium.webdriver.commo ...
- xss利用——BeEF#stage1
全文概览 简介 BeEF( The Browser Exploitation Framework) 是由Wade Alcorn 在2006年开始创建的,至今还在维护.是由ruby语言开发的专门针对浏览 ...
- python-数组+递归实现简单代数式运算
#!/usr/bin/env python3# -*- coding: utf-8 -*-#思路: #代数式是为字符串 #先将字符串处理为数值与运算符号的数组 #逐项读入数组 #每一次处理不少过两个变 ...
- react项目创建流程
react 项目搭建 系统: windows 1.安装 node node 下载地址.一路 next 如果遇到 windows 没有权限安装 msi 文件.打开 cmd,运行msiexec /pack ...
- sed: -e expression #1, char 23: unknown option to `s'
语言:bash why? / 作为sed的分隔符,和需要操作的内容有冲突 way? 替换 / 分隔符为 # 或者其他分隔符
- How to read h5 file by Matlab
In matlab, one can use the following command to read h5 file data = h5read(filename,ds) data = h5rea ...
- 为cmd中的命令添加别名,以解决java:错误: 编码 GBK 的不可映射字符 (0xAF)
使用sublineText3编写了java代码,通过cmd javac编译 提示 错误:编码GBK的不可映射字符 解决方法 使用javac -encoding UTF-8 Person.java 结果 ...