You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "kezhenxu94 (via GitHub)" <gi...@apache.org> on 2023/08/25 10:06:13 UTC

[GitHub] [skywalking] kezhenxu94 commented on a diff in pull request #11265: Check results in ALS as per downstream/upstream instead of per log

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


##########
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:
   This is for sidecar analysis, for logs from sidecar. It doesn't care about upstream or downstream. It just cares about whether there is matrics or not.



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org