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


##########
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:
   But I can do it to unify the condition to check whether there is 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