diff --git a/CHANGES.md b/CHANGES.md index 87770d5eb98160ef48a11a114cd4cd861c9ca44e..0d83362eb46974cdf00a781bb00efcb43eee6172 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 fabb709aad7793b79a28ce5851bb0f97e2663622..eca95ce2e56e43cb8c468a0b4e97fed37f7986e9 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 a4d67bd6e36af57f6efcbb2eb2d494580caedaeb..f9399d50ba2d35682a751de95a7f2108a3ffa3cf 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 6e0042574f6c0cccaf46ae82218af635e0c9f358..d5381f4dca438648ba1da0c37feba441df80b879 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 9686901044facfa62ce186a4ef9edf2d04b3a88d..98be7f1f214a6004318b6fee003258dc05e4709c 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 6bd3b35a985cbfbdf6e1abc4de557eb8d54ccc3d..0ee30e9ccd09b896ab547d60ebe9637d80e7b2e6 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,