wu-sheng commented on a change in pull request #7399:
URL: https://github.com/apache/skywalking/pull/7399#discussion_r684047148



##########
File path: 
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/Analyzer.java
##########
@@ -240,11 +242,23 @@ private void send(final AcceptableValue<?> v, final long 
time) {
     }
 
     private void generateTraffic(MeterEntity entity) {
-        ServiceTraffic s = new ServiceTraffic();
-        s.setName(requireNonNull(entity.getServiceName()));
-        s.setNodeType(NodeType.Normal);
-        
s.setTimeBucket(TimeBucket.getMinuteTimeBucket(System.currentTimeMillis()));
-        MetricsStreamProcessor.getInstance().in(s);
+        if (entity.getDetectPoint() != null) {
+            switch (entity.getDetectPoint()) {
+                case SERVER:
+                    entity.setServiceName(entity.getDestServiceName());
+                    toService(requireNonNull(entity.getDestServiceName()));
+                    serverSide(entity);
+                    break;
+                case CLIENT:
+                    entity.setServiceName(entity.getSourceServiceName());
+                    toService(requireNonNull(entity.getSourceServiceName()));
+                    clientSide(entity);
+                    break;
+            }

Review comment:
       But consider in only 1% case, if someone only uses this, but disable 
another metrics set, the topology and service list could still show up. This is 
the only purpose.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to