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 2020/08/27 09:04:33 UTC

[skywalking] branch bug created (now 92efdbb)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a change to branch bug
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at 92efdbb  Fix bug.

This branch includes the following new commits:

     new 92efdbb  Fix bug.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking] 01/01: Fix bug.

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch bug
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit 92efdbb6b23ed72e40c520ade42d883eb168167d
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Aug 27 17:04:02 2020 +0800

    Fix bug.
---
 docs/en/setup/envoy/als_setting.md                   |  8 +++++---
 .../analyzer/provider/jvm/JVMSourceDispatcher.java   | 20 ++++++++++----------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/docs/en/setup/envoy/als_setting.md b/docs/en/setup/envoy/als_setting.md
index a93e04b..b974307 100644
--- a/docs/en/setup/envoy/als_setting.md
+++ b/docs/en/setup/envoy/als_setting.md
@@ -18,12 +18,14 @@ You need three steps to open ALS.
     ```
     Note:Skywalking oap service is at skywalking namespace, and the port of gRPC service is 11800
     
-2. Open SkyWalking [envoy receiver](../backend/backend-receivers.md).
-3. Active ALS k8s-mesh analysis
+2. (Default is ACTIVATED) Activate SkyWalking [envoy receiver](../backend/backend-receivers.md). 
+3. Active ALS k8s-mesh analysis, set system env variable `SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS`=`k8s-mesh`
 ```yaml
 envoy-metric:
+  selector: ${SW_ENVOY_METRIC:default}
   default:
-    alsHTTPAnalysis: "k8s-mesh"
+    acceptMetricsService: ${SW_ENVOY_METRIC_SERVICE:true}
+    alsHTTPAnalysis: ${SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS:""} # Setting the system env variable would override this. 
 ```
 Note multiple value,please use `,` symbol split
 
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 d1211f8..dd05946 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
@@ -75,9 +75,9 @@ public class JVMSourceDispatcher {
                                         CPU cpu) {
         ServiceInstanceJVMCPU serviceInstanceJVMCPU = new ServiceInstanceJVMCPU();
         serviceInstanceJVMCPU.setId(serviceInstanceId);
-        serviceInstanceJVMCPU.setName(service);
+        serviceInstanceJVMCPU.setName(serviceInstance);
         serviceInstanceJVMCPU.setServiceId(serviceId);
-        serviceInstanceJVMCPU.setServiceName(serviceInstance);
+        serviceInstanceJVMCPU.setServiceName(service);
         serviceInstanceJVMCPU.setUsePercent(cpu.getUsagePercent());
         serviceInstanceJVMCPU.setTimeBucket(timeBucket);
         sourceReceiver.receive(serviceInstanceJVMCPU);
@@ -92,9 +92,9 @@ public class JVMSourceDispatcher {
         gcs.forEach(gc -> {
             ServiceInstanceJVMGC serviceInstanceJVMGC = new ServiceInstanceJVMGC();
             serviceInstanceJVMGC.setId(serviceInstanceId);
-            serviceInstanceJVMGC.setName(service);
+            serviceInstanceJVMGC.setName(serviceInstance);
             serviceInstanceJVMGC.setServiceId(serviceId);
-            serviceInstanceJVMGC.setServiceName(serviceInstance);
+            serviceInstanceJVMGC.setServiceName(service);
 
             switch (gc.getPhrase()) {
                 case NEW:
@@ -121,9 +121,9 @@ public class JVMSourceDispatcher {
         memories.forEach(memory -> {
             ServiceInstanceJVMMemory serviceInstanceJVMMemory = new ServiceInstanceJVMMemory();
             serviceInstanceJVMMemory.setId(serviceInstanceId);
-            serviceInstanceJVMMemory.setName(service);
+            serviceInstanceJVMMemory.setName(serviceInstance);
             serviceInstanceJVMMemory.setServiceId(serviceId);
-            serviceInstanceJVMMemory.setServiceName(serviceInstance);
+            serviceInstanceJVMMemory.setServiceName(service);
             serviceInstanceJVMMemory.setHeapStatus(memory.getIsHeap());
             serviceInstanceJVMMemory.setInit(memory.getInit());
             serviceInstanceJVMMemory.setMax(memory.getMax());
@@ -144,9 +144,9 @@ public class JVMSourceDispatcher {
         memoryPools.forEach(memoryPool -> {
             ServiceInstanceJVMMemoryPool serviceInstanceJVMMemoryPool = new ServiceInstanceJVMMemoryPool();
             serviceInstanceJVMMemoryPool.setId(serviceInstanceId);
-            serviceInstanceJVMMemoryPool.setName(service);
+            serviceInstanceJVMMemoryPool.setName(serviceInstance);
             serviceInstanceJVMMemoryPool.setServiceId(serviceId);
-            serviceInstanceJVMMemoryPool.setServiceName(serviceInstance);
+            serviceInstanceJVMMemoryPool.setServiceName(service);
 
             switch (memoryPool.getType()) {
                 case NEWGEN_USAGE:
@@ -186,9 +186,9 @@ public class JVMSourceDispatcher {
             Thread thread) {
         ServiceInstanceJVMThread serviceInstanceJVMThread = new ServiceInstanceJVMThread();
         serviceInstanceJVMThread.setId(serviceInstanceId);
-        serviceInstanceJVMThread.setName(service);
+        serviceInstanceJVMThread.setName(serviceInstance);
         serviceInstanceJVMThread.setServiceId(serviceId);
-        serviceInstanceJVMThread.setServiceName(serviceInstance);
+        serviceInstanceJVMThread.setServiceName(service);
         serviceInstanceJVMThread.setLiveCount(thread.getLiveCount());
         serviceInstanceJVMThread.setDaemonCount(thread.getDaemonCount());
         serviceInstanceJVMThread.setPeakCount(thread.getPeakCount());