protected Result buildUpstreamDownstreamMetrics(Result previousResult, final HTTPAccessLogEntry entry,
                                                    String downStreamRemoteAddr, String downStreamLocalAddr,
                                                    String upstreamRemoteAddr, String upstreamMetricsTLS) {
        if (StringUtil.isEmpty(downStreamRemoteAddr) || StringUtil.isEmpty(downStreamLocalAddr) || StringUtil.isEmpty(upstreamRemoteAddr)) {
            return previousResult;
        }

        final ServiceMetaInfo ingress = find(downStreamLocalAddr);

        final var newResult = previousResult.toBuilder();
        final var previousMetrics = previousResult.getMetrics();
        final var previousHttpMetrics = previousMetrics.getHttpMetricsBuilder();

        if (!previousResult.hasDownstreamMetrics()) {
            final ServiceMetaInfo outside = find(downStreamRemoteAddr);

            final HTTPServiceMeshMetric.Builder metric = newAdapter(entry, outside, ingress).adaptToDownstreamMetrics();

            log.debug("Transformed ingress inbound mesh metric {}", metric);
            previousHttpMetrics.addMetrics(metric);
            newResult.hasDownstreamMetrics(true);
        }

        if (!previousResult.hasUpstreamMetrics()) {
            final ServiceMetaInfo targetService = find(upstreamRemoteAddr);

            HTTPServiceMeshMetric.Builder outboundMetric =
                newAdapter(entry, ingress, targetService)
                    .adaptToUpstreamMetrics();
            if (StringUtil.isNotEmpty(upstreamMetricsTLS)) {
                // Can't parse it from tls properties, leave it to Server side.
                outboundMetric = outboundMetric.setTlsMode(NON_TLS);
            }

            log.debug("Transformed ingress outbound mesh metric {}", outboundMetric);
            previousHttpMetrics.addMetrics(outboundMetric);
            newResult.hasUpstreamMetrics(true);
        }

        return newResult.metrics(previousMetrics.setHttpMetrics(previousHttpMetrics)).service(ingress).build();
    }
Analysis log based on ingress and mesh scenarios.
oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/k8s/K8sALSServiceMeshHTTPAnalysis.java