@Override
    public Result analysis(
        final Result result,
        final StreamAccessLogsMessage.Identifier identifier,
        final HTTPAccessLogEntry entry,
        final Role role
    ) {
        switch (role) {
            case PROXY:
                return analyzeProxy(result, entry);
            case SIDECAR:
                if (result.hasResult()) {
                    return result;
                }
                return analyzeSideCar(result, entry);
        }

        return Result.builder().build();
    }
@Test
    public void testIngress2SidecarMetric() throws IOException {
        try (InputStreamReader isr = new InputStreamReader(getResourceAsStream("envoy-ingress2sidecar.msg"))) {
            StreamAccessLogsMessage.Builder requestBuilder = StreamAccessLogsMessage.newBuilder();
            JsonFormat.parser().merge(isr, requestBuilder);

            AccessLogAnalyzer.Result result = this.analysis.analysis(AccessLogAnalyzer.Result.builder().build(), requestBuilder.getIdentifier(), requestBuilder.getHttpLogs().getLogEntry(0), Role.SIDECAR);

            Assertions.assertEquals(1, result.getMetrics().getHttpMetrics().getMetricsCount());

            HTTPServiceMeshMetric incoming = result.getMetrics().getHttpMetrics().getMetrics(0);
            Assertions.assertEquals("", incoming.getSourceServiceName());
            Assertions.assertEquals("productpage", incoming.getDestServiceName());
            Assertions.assertEquals(DetectPoint.server, incoming.getDetectPoint());
        }
    }