kezhenxu94 commented on code in PR #11265:
URL: https://github.com/apache/skywalking/pull/11265#discussion_r1305474457


##########
oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/AccessLogAnalyzer.java:
##########
@@ -78,10 +79,17 @@ static class Result {
         /**
          * The analyzed metrics result.
          */
-        private ServiceMeshMetrics.Builder metrics;
+        @Builder.Default
+        private ServiceMeshMetrics.Builder metrics = 
ServiceMeshMetrics.newBuilder();
+
+        @Accessors(fluent = true)
+        private boolean hasDownstreamMetrics;
+        @Accessors(fluent = true)
+        private boolean hasUpstreamMetrics;
 
         public boolean hasResult() {
-            return metrics != null && 
(metrics.getHttpMetrics().getMetricsCount() > 0 || 
metrics.getTcpMetrics().getMetricsCount() > 0);
+            return metrics.getHttpMetrics().getMetricsCount() > 0
+                || metrics.getTcpMetrics().getMetricsCount() > 0;

Review Comment:
   Yes, you can make sense of the names: for server sidecar there is always 
only downstream metrics, for client sidecar there is always only upstream 
metrics. 



-- 
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