diff --git a/apm-protocol/apm-network/src/main/proto b/apm-protocol/apm-network/src/main/proto index 0da9c8b3e111..d4da5699915e 160000 --- a/apm-protocol/apm-network/src/main/proto +++ b/apm-protocol/apm-network/src/main/proto @@ -1 +1 @@ -Subproject commit 0da9c8b3e111fb51c9f8854cae16d4519462ecfe +Subproject commit d4da5699915ee52288f8ff1c954decf6363485bc diff --git a/docs/en/api/jvm-protocol.md b/docs/en/api/jvm-protocol.md index 2374a8d3a6f0..e22df4d51890 100644 --- a/docs/en/api/jvm-protocol.md +++ b/docs/en/api/jvm-protocol.md @@ -65,6 +65,11 @@ enum PoolType { SURVIVOR_USAGE = 3; PERMGEN_USAGE = 4; METASPACE_USAGE = 5; + ZHEAP_USAGE = 6; + COMPRESSED_CLASS_SPACE_USAGE = 7; + CODEHEAP_NON_NMETHODS_USAGE = 8; + CODEHEAP_PROFILED_NMETHODS_USAGE = 9; + CODEHEAP_NON_PROFILED_NMETHODS_USAGE = 10; } message GC { diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index cebc12bf8ca9..a5715bae9fd6 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -26,6 +26,7 @@ * Optimize queryBasicTraces in TraceQueryEsDAO. * Fix `WebhookCallback` send incorrect messages, add catch exception for each callback HTTP Post. * Fix AlarmRule expression validation: add labeled metrics mock data for check. +* Support collect ZGC memory pool metrics. #### UI @@ -36,6 +37,8 @@ * Refactor: update pagination style. No visualization style change. * Apply MQE on K8s layer UI-templates. * Fix icons display in trace tree diagram. +* fix: update tooltip style to support multiple metrics scrolling view in a metrics graph. +* Add a new widget to show jvm memory pool detail. #### Documentation 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 eca95ce2e56e..bf7139014a04 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 @@ -174,6 +174,21 @@ private void sendToMemoryPoolMetricProcess(String service, case CODE_CACHE_USAGE: serviceInstanceJVMMemoryPool.setPoolType(MemoryPoolType.CODE_CACHE_USAGE); break; + case ZHEAP_USAGE: + serviceInstanceJVMMemoryPool.setPoolType(MemoryPoolType.ZHEAP_USAGE); + break; + case COMPRESSED_CLASS_SPACE_USAGE: + serviceInstanceJVMMemoryPool.setPoolType(MemoryPoolType.COMPRESSED_CLASS_SPACE_USAGE); + break; + case CODEHEAP_NON_NMETHODS_USAGE: + serviceInstanceJVMMemoryPool.setPoolType(MemoryPoolType.CODEHEAP_NON_NMETHODS_USAGE); + break; + case CODEHEAP_PROFILED_NMETHODS_USAGE: + serviceInstanceJVMMemoryPool.setPoolType(MemoryPoolType.CODEHEAP_PROFILED_NMETHODS_USAGE); + break; + case CODEHEAP_NON_PROFILED_NMETHODS_USAGE: + serviceInstanceJVMMemoryPool.setPoolType(MemoryPoolType.CODEHEAP_NON_PROFILED_NMETHODS_USAGE); + break; } serviceInstanceJVMMemoryPool.setInit(memoryPool.getInit()); diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/MemoryPoolType.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/MemoryPoolType.java index 2e39271d9c9e..831e172f0453 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/MemoryPoolType.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/MemoryPoolType.java @@ -19,5 +19,15 @@ package org.apache.skywalking.oap.server.core.source; public enum MemoryPoolType { - CODE_CACHE_USAGE, NEWGEN_USAGE, OLDGEN_USAGE, SURVIVOR_USAGE, PERMGEN_USAGE, METASPACE_USAGE + CODE_CACHE_USAGE, + NEWGEN_USAGE, + OLDGEN_USAGE, + SURVIVOR_USAGE, + PERMGEN_USAGE, + METASPACE_USAGE, + ZHEAP_USAGE, + COMPRESSED_CLASS_SPACE_USAGE, + CODEHEAP_NON_NMETHODS_USAGE, + CODEHEAP_PROFILED_NMETHODS_USAGE, + CODEHEAP_NON_PROFILED_NMETHODS_USAGE, } 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 d5381f4dca43..497f6c41bb0c 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 @@ -22,6 +22,17 @@ instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.used).filter(heapStatus 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_memory_pool_code_cache = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.CODE_CACHE_USAGE).longAvg(); +instance_jvm_memory_pool_newgen = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.NEWGEN_USAGE).longAvg(); +instance_jvm_memory_pool_oldgen = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.OLDGEN_USAGE).longAvg(); +instance_jvm_memory_pool_survivor = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.SURVIVOR_USAGE).longAvg(); +instance_jvm_memory_pool_permgen = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.PERMGEN_USAGE).longAvg(); +instance_jvm_memory_pool_metaspace = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.METASPACE_USAGE).longAvg(); +instance_jvm_memory_pool_zheap = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.ZHEAP_USAGE).longAvg(); +instance_jvm_memory_pool_compressed_class_space = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.COMPRESSED_CLASS_SPACE_USAGE).longAvg(); +instance_jvm_memory_pool_codeheap_non_nmethods = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.CODEHEAP_NON_NMETHODS_USAGE).longAvg(); +instance_jvm_memory_pool_codeheap_profiled_nmethods = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.CODEHEAP_PROFILED_NMETHODS_USAGE).longAvg(); +instance_jvm_memory_pool_codeheap_non_profiled_nmethods = from(ServiceInstanceJVMMemoryPool.used).filter(poolType == MemoryPoolType.CODEHEAP_NON_PROFILED_NMETHODS_USAGE).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(); diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json index bc51b96b8b13..ed8b3e26e956 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json @@ -284,7 +284,7 @@ "y": 0, "w": 8, "h": 13, - "i": "5", + "i": "4", "type": "Widget", "widget": { "title": "JVM Memory (MB)" @@ -326,7 +326,88 @@ ] }, { - "x": 8, + "x": 16, + "y": 0, + "w": 8, + "h": 13, + "i": "5", + "type": "Widget", + "widget": { + "title": "JVM Memory Detail (MB)" + }, + "graph": { + "type": "Line", + "step": false, + "smooth": false, + "showSymbol": true, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "CodeCache" + }, + { + "label": "NewGen" + }, + { + "label": "OldGen" + }, + { + "label": "Survivor" + }, + { + "label": "PermGen" + }, + { + "label": "Metaspace" + }, + { + "label": "ZHeap" + }, + { + "label": "Compressed Class Space" + }, + { + "label": "CodeHeap 'non-nmethods'" + }, + { + "label": "CodeHeap 'profiled nmethods'" + }, + { + "label": "CodeHeap 'non-profiled nmethods'" + } + ], + "metricMode": "Expression", + "expressions": [ + "instance_jvm_memory_pool_code_cache/1048576", + "instance_jvm_memory_pool_newgen/1048576", + "instance_jvm_memory_pool_oldgen/1048576", + "instance_jvm_memory_pool_survivor/1048576", + "instance_jvm_memory_pool_permgen/1048576", + "instance_jvm_memory_pool_metaspace/1048576", + "instance_jvm_memory_pool_zheap/1048576", + "instance_jvm_memory_pool_compressed_class_space/1048576", + "instance_jvm_memory_pool_codeheap_non_nmethods/1048576", + "instance_jvm_memory_pool_codeheap_profiled_nmethods/1048576", + "instance_jvm_memory_pool_codeheap_non_profiled_nmethods/1048576" + ], + "typesOfMQE": [ + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES", + "TIME_SERIES_VALUES" + ] + }, + { + "x": 16, "y": 13, "w": 8, "h": 13, @@ -367,8 +448,8 @@ ] }, { - "x": 16, - "y": 13, + "x": 0, + "y": 26, "w": 8, "h": 13, "i": "13", @@ -440,10 +521,10 @@ ] }, { - "x": 0, + "x": 8, "y": 26, "w": 8, - "h": 12, + "h": 13, "i": "15", "type": "Widget", "widget": { @@ -479,8 +560,8 @@ ] }, { - "x": 16, - "y": 0, + "x": 0, + "y": 13, "w": 8, "h": 13, "i": "6", @@ -520,7 +601,7 @@ ] }, { - "x": 0, + "x": 8, "y": 13, "w": 8, "h": 13, diff --git a/skywalking-ui b/skywalking-ui index e42734ba80e1..1be2792ff465 160000 --- a/skywalking-ui +++ b/skywalking-ui @@ -1 +1 @@ -Subproject commit e42734ba80e1ada3784880b8b70cafc69e234b79 +Subproject commit 1be2792ff46547fafe5b554b0cd4f086dd8d02b7 diff --git a/test/e2e-v2/java-test-service/e2e-protocol/src/main/proto b/test/e2e-v2/java-test-service/e2e-protocol/src/main/proto index b8d5a5c27c27..d4da5699915e 160000 --- a/test/e2e-v2/java-test-service/e2e-protocol/src/main/proto +++ b/test/e2e-v2/java-test-service/e2e-protocol/src/main/proto @@ -1 +1 @@ -Subproject commit b8d5a5c27c271303ff1d3911fb85a554352f4f23 +Subproject commit d4da5699915ee52288f8ff1c954decf6363485bc