skywalking中表字段的信息











定义了上面的字段之后,为了计算数据,skywalking定义了一种OAL脚本来进行聚合运算





skywalking的所有的oal定义在文件official_analysis.oal中

文件的内容如下
// All scope metrics
all_p99 = from(All.latency).p99(10);
all_p95 = from(All.latency).p95(10);
all_p90 = from(All.latency).p90(10);
all_p75 = from(All.latency).p75(10);
all_p50 = from(All.latency).p50(10);
all_heatmap = from(All.latency).thermodynamic(100, 20); // Service scope metrics
service_resp_time = from(Service.latency).longAvg();
service_sla = from(Service.*).percent(status == true);
service_cpm = from(Service.*).cpm();
service_p99 = from(Service.latency).p99(10);
service_p95 = from(Service.latency).p95(10);
service_p90 = from(Service.latency).p90(10);
service_p75 = from(Service.latency).p75(10);
service_p50 = from(Service.latency).p50(10); // Service relation scope metrics for topology
service_relation_client_cpm = from(ServiceRelation.*).filter(detectPoint == DetectPoint.CLIENT).cpm();
service_relation_server_cpm = from(ServiceRelation.*).filter(detectPoint == DetectPoint.SERVER).cpm();
service_relation_client_call_sla = from(ServiceRelation.*).filter(detectPoint == DetectPoint.CLIENT).percent(status == true);
service_relation_server_call_sla = from(ServiceRelation.*).filter(detectPoint == DetectPoint.SERVER).percent(status == true);
service_relation_client_resp_time = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).longAvg();
service_relation_server_resp_time = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).longAvg();
service_relation_client_p99 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).p99(10);
service_relation_server_p99 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).p99(10);
service_relation_client_p95 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).p95(10);
service_relation_server_p95 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).p95(10);
service_relation_client_p90 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).p90(10);
service_relation_server_p90 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).p90(10);
service_relation_client_p75 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).p75(10);
service_relation_server_p75 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).p75(10);
service_relation_client_p50 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).p50(10);
service_relation_server_p50 = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).p50(10); // Service Instance Scope metrics
service_instance_sla = from(ServiceInstance.*).percent(status == true);
service_instance_resp_time= from(ServiceInstance.latency).longAvg();
service_instance_cpm = from(ServiceInstance.*).cpm(); // Endpoint scope metrics
endpoint_cpm = from(Endpoint.*).cpm();
endpoint_avg = from(Endpoint.latency).longAvg();
endpoint_sla = from(Endpoint.*).percent(status == true);
endpoint_p99 = from(Endpoint.latency).p99(10);
endpoint_p95 = from(Endpoint.latency).p95(10);
endpoint_p90 = from(Endpoint.latency).p90(10);
endpoint_p75 = from(Endpoint.latency).p75(10);
endpoint_p50 = from(Endpoint.latency).p50(10); // Endpoint relation scope metrics
endpoint_relation_cpm = from(EndpointRelation.*).filter(detectPoint == DetectPoint.SERVER).cpm();
endpoint_relation_resp_time = from(EndpointRelation.rpcLatency).filter(detectPoint == DetectPoint.SERVER).longAvg(); // JVM instance metrics
instance_jvm_cpu = from(ServiceInstanceJVMCPU.usePercent).doubleAvg();
instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == false).longAvg();
instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).sum();
instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum(); database_access_resp_time = from(DatabaseAccess.latency).longAvg();
database_access_sla = from(DatabaseAccess.*).percent(status == true);
database_access_cpm = from(DatabaseAccess.*).cpm();
database_access_p99 = from(DatabaseAccess.latency).p99(10);
database_access_p95 = from(DatabaseAccess.latency).p95(10);
database_access_p90 = from(DatabaseAccess.latency).p90(10);
database_access_p75 = from(DatabaseAccess.latency).p75(10);
database_access_p50 = from(DatabaseAccess.latency).p50(10); // CLR instance metrics
instance_clr_cpu = from(ServiceInstanceCLRCPU.usePercent).doubleAvg();
instance_clr_gen0_collect_count = from(ServiceInstanceCLRGC.gen0CollectCount).sum();
instance_clr_gen1_collect_count = from(ServiceInstanceCLRGC.gen1CollectCount).sum();
instance_clr_gen2_collect_count = from(ServiceInstanceCLRGC.gen2CollectCount).sum();
instance_clr_heap_memory = from(ServiceInstanceCLRGC.heapMemory).longAvg();
instance_clr_available_completion_port_threads = from(ServiceInstanceCLRThread.availableCompletionPortThreads).max();
instance_clr_available_worker_threads = from(ServiceInstanceCLRThread.availableWorkerThreads).max();
instance_clr_max_completion_port_threads = from(ServiceInstanceCLRThread.maxCompletionPortThreads).max();
instance_clr_max_worker_threads = from(ServiceInstanceCLRThread.maxWorkerThreads).max(); // Envoy instance metrics
envoy_heap_memory_max_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.memory_heap_size").maxDouble();
envoy_total_connections_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.total_connections").maxDouble();
envoy_parent_connections_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.parent_connections").maxDouble(); // Disable unnecessary hard core sources
/////////
// disable(segment);
// disable(endpoint_relation_server_side);
// disable(top_n_database_statement);
// disable(zipkin_span);
// disable(jaeger_span);
定义的指标值如下
全局指标 all_p99, 所有服务响应时间的 p99 值
all_p95
all_p90
all_p75
all_p70
all_heatmap, 所有服务响应时间的热点图
服务指标 service_resp_time, 服务的平均响应时间
service_sla, 服务的成功率
service_cpm, 服务每分钟调用次数
service_p99, 服务响应时间的 p99 值
service_p95
service_p90
service_p75
service_p50
服务实例指标 service_instance_sla, 服务实例的成功率
service_instance_resp_time, 服务实例的平均响应时间
service_instance_cpm, 服务实例每分钟调用次数
端点指标 endpoint_cpm, 端点每分钟调用次数
endpoint_avg, 端点平均响应时间
endpoint_sla, 端点成功率
endpoint_p99, 端点响应时间的 p99 值
endpoint_p95
endpoint_p90
endpoint_p75
endpoint_p50
JVM 指标, JVM 相关的指标, 只有当 javaagent 启用时才有效 instance_jvm_cpu
instance_jvm_memory_heap
instance_jvm_memory_noheap
instance_jvm_memory_heap_max
instance_jvm_memory_noheap_max
instance_jvm_young_gc_time
instance_jvm_old_gc_time
instance_jvm_young_gc_count
instance_jvm_old_gc_count
服务关系指标, 代表服务之间调用的指标 指标的 ID 只能在拓扑图查询中获取 service_relation_client_cpm, 在客户端每分钟检测到的调用次数
service_relation_server_cpm, 在服务端每分钟检测到的调用次数
service_relation_client_call_sla, 在客户端检测到的成功率
service_relation_server_call_sla, 在服务端检测到的成功率
service_relation_client_resp_time, 在客户端检测到的平均响应时间
service_relation_server_resp_time, 在服务端检测到的平均响应时间
端点关系指标, 代表相互依赖的端点之间的指标. 只有在追踪代理启用时有效. 指标 ID 只能在拓扑查询中获得. endpoint_relation_cpm
endpoint_relation_resp_time
我们来看看skywalking中页面框图的意思

上面对于的计算指标是


首先看latency表示的意思是服务下每个请求的耗时

all_p99 = from(All.latency).p99(10);all表示所有的服务,服务就是应用的意思当前系统下面有三个应用,三个应用下面一共存在1000次请求,这里指的就是所有1000次请求中99%的请求响应时间都是在某个范围内

global Top Throughput中表示当前所有的应用中的方法中,那个请求的数量最多
global Top slow Endpoint表示当前所有应用下面的那个请求最耗时

这里的Global heatmap实际上调用的是

当前的请求在热力图上的分布情况,每一次请求在热力图上面对应一个点

表示当前应用下的全部请求耗时在20毫秒和100毫秒

service_resp_time = from(Service.latency).longAvg();

表示当前应用下每个请求的耗时的平均值,所以存在不准的情况,应该不应该把当前应用向注册中心那个请求时间算在内,这里要注意
service_sla = from(Service.*).percent(status == true);

表示当前应用下sla:请求的成功率是多少




上面表表示应用spring-user在20点34分到21点04分这半个小时内,应用这段时间内每分钟的请求数目是1.33次,这个1.33次是如何算出来的了

应用在20点43分,发送了一次请求,在20点44分发送了一次请求,在20点45分发生了2次请求,所有20点43 20点44分 20点45分,三分钟之内发送了4请请求,每一分钟的平均请求时间为4除以3等于1.33.,这里要注意虽然选择的查询时间从20点11到21点11一共30分钟,这里面大部分时间没有请求产生,平均请求次数不能是4/30,而是统计真正发送请求的时间
对于的信息在数据库的表service_cpm中可以看到,entity_id表示当前应用的编号,3对于的就是spring-user应用,service_cpm记录的是当前一个小时之内应用的访问数据

如果当前应用选择查询的时间超过一个小时,选择最近一天,如下图所示,我们看到cpm为0,因为查询的是


我们可以看到选择最近一天查询的时间间隔是小时,查询的是service_cpm_hour这张表

从上面分析我们已经知道应用在20点43分,发送了一次请求,在20点44分发送了一次请求,在20点45分发生了2次请求,所有20点43 20点44分 20点45分,所以在20 内发送了4次请求,所有表中service_cpm_hour对于的2020010420这个时间点的值是4,页面上从1月3号21点到1月4号21点内没有任何请求,所以cpm为0
同理,选择最近一周,查询的是service_cpm_day这张表


在表service_cpm_day中时间是按照天进行统计的,在20200104 在1月4号这天发生了4次请求
同理应用的平均响应时间类似,这里为啥是74264.67ms了



应用在20点43分的这一分钟内发送了请求应用的平均响应时间123851,在20点44分应用在这一分钟内发生了请求对于的平均响应时间是76455,在20点45分发生了请求对于的平均响应时间是22488,所以在20点00到21点这段时间内,只有3分钟内发送了请求,其余时间没有发送请求,平均响应时间为(123851+76455+22488)/3=74264.67ms
应用的平均响应时间,是依据应用下的每个应用的实例响应时间计算出来的,查询的表如下

应用下面的p99 p50如下,查询的是service_p50相关的表


表示当前应用下面那个请求最慢,当前应用存在哪些实例
对于方法的操作

首先要选择那个应用,然后选择该应用下对于的端点
调用的统计信息为
// Endpoint scope metrics
endpoint_cpm = from(Endpoint.*).cpm();
endpoint_avg = from(Endpoint.latency).longAvg();
endpoint_sla = from(Endpoint.*).percent(status == true);
endpoint_p99 = from(Endpoint.latency).p99(10);
endpoint_p95 = from(Endpoint.latency).p95(10);
endpoint_p90 = from(Endpoint.latency).p90(10);
endpoint_p75 = from(Endpoint.latency).p75(10);
endpoint_p50 = from(Endpoint.latency).p50(10);
表示该端点对于的平均响应时间,平均请求信息,平均每分钟的请求数目灯

表示应用spring-user的方法/user/5在20点45分,这一分钟内的平均响应时间是25577毫秒

这里表示的是应用spring-user的方法/user/5在20点32分到21点02分内,方法的平均响应时间是74714毫秒
skywalking中表字段的信息的更多相关文章
- net发布的dll方法和类显示注释信息(字段说明信息)[图解]
自己发布的dll添加的另一个项目中突然没有字段说明信息了,给使用带来了很多的不便,原因是为了跨项目引用,所以导致不显示注释信息的,一下是解决这个问题的方法. 在要发布(被引用)的项目上右键 => ...
- crmsql句子的实体关系实体字段的信息窗口
在crm里面怎样用sql语句查询这些信息? 查询实体信息: --查询实体信息,实体名称:account select * from MetadataSchema.Entity where name= ...
- mysql alter 用法,修改表,字段等信息
一: 修改表信息 1.修改表名 alter table test_a rename to sys_app; 2.修改表注释 alter table sys_application comment '系 ...
- sqlserver 获取数据库、表和字段相关信息
--获取指定服务器上的所有数据库 SELECT Name FROM Master..SysDatabases ORDER BY Name --获取指定数据库下所有表 SELECT Name FROM ...
- salesforce lightning零基础学习(十六) 公用组件之 获取字段label信息
我们做的项目好多都是多语言的项目,针对不同国家需要展示不同的语言的标题.我们在classic中的VF page可谓是得心应手,因为系统中已经封装好了我们可以直接在VF获取label/api name等 ...
- 查找SQL数据表或视图中的字段属性信息
一.只支持表,非常牛逼的 SELECT a.name,(case when (SELECT count(*) FROM sysobjects WHERE (name in (SELECT name F ...
- Golang中Struct与DB中表字段通过反射自动映射 - sqlmapper
Golang中操作数据库已经有现成的库"database/sql"可以用,但是"database/sql"只提供了最基础的操作接口: 对数据库中一张表的增删改查 ...
- 修改SQL数据库中表字段类型时,报“一个或多个对象访问此列”错误的解决方法
在SQL数据库中使用SQL语句(格式:alter table [tablename] alter column [colname] [newDataType])修改某表的字段类型时,报一下错误:由于一 ...
- Oracle中表字段相关操作举例
--创建测试表 create or replace table student ( xh ), --学号 xm ), --姓名 sex ), --性别 birthday date, --日期 sal ...
随机推荐
- css background-image 学习笔记
先给出图片原样 1.默认从从上到右下1比1 填充的,如果元素的高度和宽度小于图片,则只能显示部分图片.效果如下图 2.如果元素的高度和宽度大于图片,则默认会用图片平铺元素.效果如下图 3.可以是用ba ...
- CSS选择器-类-ID-伪类
类选择器(Class selectors) 通过设置元素的 class 属性,可以为元素指定类名.类名由开发者自己指定. 文档中的多个元素可以拥有同一个类名. 在写样式表时,类选择器是以英文句号(.) ...
- JAVASE(八) 数组: 一维数组、二维数组、动态数组、静态数组
个人博客网:https://wushaopei.github.io/ (你想要这里多有) 1.一维数组 1.1 数组的声明和初始化声明方式: String str[]; //不建议使用 Stri ...
- Java实现 LeetCode 671 二叉树中第二小的节点(遍历树)
671. 二叉树中第二小的节点 给定一个非空特殊的二叉树,每个节点都是正数,并且每个节点的子节点数量只能为 2 或 0.如果一个节点有两个子节点的话,那么这个节点的值不大于它的子节点的值. 给出这样的 ...
- Java实现 LeetCode 637 二叉树的层平均值(遍历树)
637. 二叉树的层平均值 给定一个非空二叉树, 返回一个由每层节点平均值组成的数组. 示例 1: 输入: 3 / \ 9 20 / \ 15 7 输出: [3, 14.5, 11] 解释: 第0层的 ...
- java实现第八届蓝桥杯平方十位数
平方十位数 题目描述 由0~9这10个数字不重复.不遗漏,可以组成很多10位数字. 这其中也有很多恰好是平方数(是某个数的平方). 比如:1026753849,就是其中最小的一个平方数. 请你找出其中 ...
- /etc/alternatives
如何安装一个可执行程序 一般来说我们一个可执行程序,可能在多个路径下,比如在opt路径下,或者在自己的home下. 当要达到在系统的任意路径下敲击该命令,都可执行的话,一般要将该可执行命令的路径加入到 ...
- iOS-Code Data多线程的封装详解
Code Data 的单例封装: 很容易发现,系统生成的模版代码将Core Data 的基本的准备(貌似还挺复杂!)都放在 AppDelegate中了,可苹果公司为什么会这么做呢? ...
- k8s学习-集群安装
3.kubernetes安装 3.1.规划 hostname ip 内存 核 硬 说明 harbor 192.168.136.30 2G 2 100G 私有仓库 koolshare 2G 2 20G ...
- 【网页设计】第四周 JavaSript
第四周 JSP 一 JSP概述 含义: Java Server Pages, 广泛使用的服务器端脚本语言之一:(运行在服务器端 BS结构) 由服务器端的JSP引擎执行JSP代码,然后将结果以HT ...