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/12 16:54:43 UTC

[skywalking] branch master updated: Follow protocol grammar fix `GCPhrase -> GCPhase` (#8420)

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 40bec82  Follow protocol grammar fix `GCPhrase -> GCPhase` (#8420)
40bec82 is described below

commit 40bec82e300c44841b8838f85a4cda64f7c85b8b
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Jan 13 00:49:19 2022 +0800

    Follow protocol grammar fix `GCPhrase -> GCPhase` (#8420)
    
    * Follow protocol grammar fix `GCPhrase -> GCPhase`
    
    * Fix doc.
---
 CHANGES.md                                                        | 1 +
 apm-protocol/apm-network/src/main/proto                           | 2 +-
 docs/en/concepts-and-designs/scope-definitions.md                 | 2 +-
 .../oap/server/analyzer/provider/jvm/JVMSourceDispatcher.java     | 8 ++++----
 .../oap/server/core/source/{GCPhrase.java => GCPhase.java}        | 2 +-
 .../skywalking/oap/server/core/source/ServiceInstanceJVMGC.java   | 2 +-
 oap-server/server-starter/src/main/resources/oal/java-agent.oal   | 8 ++++----
 7 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 3858f55..0ffad18 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -26,6 +26,7 @@ Release Notes.
 * Fix query sort metrics failure in H2 Storage.
 * Bump up grpc to 1.43.2 and protobuf to 3.19.2 to fix CVE-2021-22569.
 * Add source layer and dest layer to relation.
+* Follow protocol grammar fix `GCPhrase -> GCPhase`.
 
 #### UI
 
diff --git a/apm-protocol/apm-network/src/main/proto b/apm-protocol/apm-network/src/main/proto
index 52f2c74..667134d 160000
--- a/apm-protocol/apm-network/src/main/proto
+++ b/apm-protocol/apm-network/src/main/proto
@@ -1 +1 @@
-Subproject commit 52f2c74b7fc25a3827f268efcf5cb75c327a7934
+Subproject commit 667134d08ffd63122062971d320c34e7e10a7c9e
diff --git a/docs/en/concepts-and-designs/scope-definitions.md b/docs/en/concepts-and-designs/scope-definitions.md
index 7bf9285..7102860 100644
--- a/docs/en/concepts-and-designs/scope-definitions.md
+++ b/docs/en/concepts-and-designs/scope-definitions.md
@@ -103,7 +103,7 @@ This calculates the metrics data if the service instance is a JVM and collects t
 |---|---|---|---|
 | name |  The name of the service instance, such as `ip:port@Service Name`.  **Note**: Currently, the native agent uses `uuid@ipv4` as the instance name, which does not assist in setting up a filter in aggregation. | | string|
 | serviceName | The name of the service. | | string |
-| phrase | Includes both NEW and OLD. | | Enum |
+| phase | Includes both NEW and OLD. | | Enum |
 | time | The time spent in GC. | | long |
 | count | The count in GC operations. | | long |
 
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 22a096e..fabb709 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
@@ -30,7 +30,7 @@ import org.apache.skywalking.apm.network.language.agent.v3.Thread;
 import org.apache.skywalking.oap.server.core.CoreModule;
 import org.apache.skywalking.oap.server.core.analysis.IDManager;
 import org.apache.skywalking.oap.server.core.analysis.TimeBucket;
-import org.apache.skywalking.oap.server.core.source.GCPhrase;
+import org.apache.skywalking.oap.server.core.source.GCPhase;
 import org.apache.skywalking.oap.server.core.source.MemoryPoolType;
 import org.apache.skywalking.oap.server.core.source.ServiceInstanceJVMCPU;
 import org.apache.skywalking.oap.server.core.source.ServiceInstanceJVMClass;
@@ -100,12 +100,12 @@ public class JVMSourceDispatcher {
             serviceInstanceJVMGC.setServiceId(serviceId);
             serviceInstanceJVMGC.setServiceName(service);
 
-            switch (gc.getPhrase()) {
+            switch (gc.getPhase()) {
                 case NEW:
-                    serviceInstanceJVMGC.setPhrase(GCPhrase.NEW);
+                    serviceInstanceJVMGC.setPhase(GCPhase.NEW);
                     break;
                 case OLD:
-                    serviceInstanceJVMGC.setPhrase(GCPhrase.OLD);
+                    serviceInstanceJVMGC.setPhase(GCPhase.OLD);
                     break;
             }
 
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhrase.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java
similarity index 97%
rename from oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhrase.java
rename to oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java
index 3381f92..a4d67bd 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhrase.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/GCPhase.java
@@ -18,6 +18,6 @@
 
 package org.apache.skywalking.oap.server.core.source;
 
-public enum GCPhrase {
+public enum GCPhase {
     NEW, OLD
 }
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceJVMGC.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceJVMGC.java
index 64a4dd8..36868a4 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceJVMGC.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceJVMGC.java
@@ -54,7 +54,7 @@ public class ServiceInstanceJVMGC extends Source {
     private String serviceId;
     @Getter
     @Setter
-    private GCPhrase phrase;
+    private GCPhase phase;
     @Getter
     @Setter
     private long time;
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 b7a3702..6e00425 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,10 +22,10 @@ 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_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();
+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_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_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();