You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/01/13 15:25:44 UTC
[skywalking] branch master updated: Support ZGC metric is OAP and UI (#8425)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new b96cd37 Support ZGC metric is OAP and UI (#8425)
b96cd37 is described below
commit b96cd377c901a25e068bf3450191de09ea57b3db
Author: xu1009 <29...@qq.com>
AuthorDate: Thu Jan 13 23:25:25 2022 +0800
Support ZGC metric is OAP and UI (#8425)
Co-authored-by: litexu <li...@tencent.com>
Co-authored-by: 吴晟 Wu Sheng <wu...@foxmail.com>
---
CHANGES.md | 1 +
.../oap/server/analyzer/provider/jvm/JVMSourceDispatcher.java | 3 +++
.../org/apache/skywalking/oap/server/core/source/GCPhase.java | 2 +-
oap-server/server-starter/src/main/resources/oal/java-agent.oal | 2 ++
.../src/main/resources/ui-initialized-templates/apm.yml | 4 ++--
.../main/resources/ui-initialized-templates/topology-instance.yml | 8 ++++----
6 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 87770d5..0d83362 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -29,6 +29,7 @@ Release Notes.
* Follow protocol grammar fix `GCPhrase -> GCPhase`.
* Set layer to mesh relation.
* Add `FAAS` to SpanLayer.
+* Support ZGC GC time and count metric collecting
#### UI
diff --git a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/jvm/JVMSourceDispatcher.java b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/jvm/JVMSourceDispatcher.java
index fabb709..eca95ce 100644
--- a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/jvm/JVMSourceDispatcher.java
+++ b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/jvm/JVMSourceDispatcher.java
@@ -107,6 +107,9 @@ public class JVMSourceDispatcher {
case OLD:
serviceInstanceJVMGC.setPhase(GCPhase.OLD);
break;
+ case NORMAL:
+ serviceInstanceJVMGC.setPhase(GCPhase.NORMAL);
+ break;
}
serviceInstanceJVMGC.setTime(gc.getTime());
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java
index a4d67bd..f9399d5 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java
@@ -19,5 +19,5 @@
package org.apache.skywalking.oap.server.core.source;
public enum GCPhase {
- NEW, OLD
+ NEW, OLD, NORMAL
}
diff --git a/oap-server/server-starter/src/main/resources/oal/java-agent.oal b/oap-server/server-starter/src/main/resources/oal/java-agent.oal
index 6e00425..d5381f4 100644
--- a/oap-server/server-starter/src/main/resources/oal/java-agent.oal
+++ b/oap-server/server-starter/src/main/resources/oal/java-agent.oal
@@ -24,8 +24,10 @@ instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapSta
instance_jvm_memory_noheap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phase == GCPhase.NEW).sum();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phase == GCPhase.OLD).sum();
+instance_jvm_normal_gc_time = from(ServiceInstanceJVMGC.time).filter(phase == GCPhase.NORMAL).sum();
instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phase == GCPhase.NEW).sum();
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phase == GCPhase.OLD).sum();
+instance_jvm_normal_gc_count = from(ServiceInstanceJVMGC.count).filter(phase == GCPhase.NORMAL).sum();
instance_jvm_thread_live_count = from(ServiceInstanceJVMThread.liveCount).longAvg();
instance_jvm_thread_daemon_count = from(ServiceInstanceJVMThread.daemonCount).longAvg();
instance_jvm_thread_peak_count = from(ServiceInstanceJVMThread.peakCount).longAvg();
diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml
index 9686901..98be7f1 100644
--- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml
+++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml
@@ -399,7 +399,7 @@ templates:
"entityType": "ServiceInstance",
"independentSelector": false,
"metricType": "REGULAR_VALUE",
- "metricName": "instance_jvm_young_gc_time, instance_jvm_old_gc_time",
+ "metricName": "instance_jvm_young_gc_time, instance_jvm_old_gc_time, instance_jvm_normal_gc_time",
"queryMetricType": "readMetricsValues",
"chartType": "ChartLine",
"unit": "ms"
@@ -413,7 +413,7 @@ templates:
"metricType": "REGULAR_VALUE",
"queryMetricType": "readMetricsValues",
"chartType": "ChartBar",
- "metricName": "instance_jvm_young_gc_count, instance_jvm_old_gc_count"
+ "metricName": "instance_jvm_young_gc_count, instance_jvm_old_gc_count, instance_jvm_normal_gc_count"
},
{
"width": 3,
diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/topology-instance.yml b/oap-server/server-starter/src/main/resources/ui-initialized-templates/topology-instance.yml
index 6bd3b35..0ee30e9 100644
--- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/topology-instance.yml
+++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/topology-instance.yml
@@ -101,7 +101,7 @@ templates:
"entityType": "ServiceInstance",
"independentSelector": false,
"metricType": "REGULAR_VALUE",
- "metricName": "instance_jvm_young_gc_time, instance_jvm_old_gc_time",
+ "metricName": "instance_jvm_young_gc_time, instance_jvm_old_gc_time, instance_jvm_normal_gc_time",
"queryMetricType": "readMetricsValues",
"chartType": "ChartLine",
"unit": "ms"
@@ -115,7 +115,7 @@ templates:
"metricType": "REGULAR_VALUE",
"queryMetricType": "readMetricsValues",
"chartType": "ChartBar",
- "metricName": "instance_jvm_young_gc_count, instance_jvm_old_gc_count"
+ "metricName": "instance_jvm_young_gc_count, instance_jvm_old_gc_count, instance_jvm_normal_gc_count"
},
{
"width": 3,
@@ -238,7 +238,7 @@ templates:
"entityType": "ServiceInstance",
"independentSelector": false,
"metricType": "REGULAR_VALUE",
- "metricName": "instance_jvm_young_gc_time, instance_jvm_old_gc_time",
+ "metricName": "instance_jvm_young_gc_time, instance_jvm_old_gc_time, instance_jvm_normal_gc_time",
"queryMetricType": "readMetricsValues",
"chartType": "ChartLine",
"unit": "ms"
@@ -252,7 +252,7 @@ templates:
"metricType": "REGULAR_VALUE",
"queryMetricType": "readMetricsValues",
"chartType": "ChartBar",
- "metricName": "instance_jvm_young_gc_count, instance_jvm_old_gc_count"
+ "metricName": "instance_jvm_young_gc_count, instance_jvm_old_gc_count, instance_jvm_normal_gc_count"
},
{
"width": 3,