liqiangz commented on issue #6210: URL: https://github.com/apache/skywalking/issues/6210#issuecomment-965998972
> @liqiangz Thanks for the feedback, but I am a little confused about what you are asking for. > > This service is already streaming, which means you could deliver the metrics in a bulk mode, rather than once per time. > > https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/Meter.proto#L31 @wu-sheng A ResourceMetrics in the OTLP protocol contains a collection of metrics from a Resource. This is a suitable unit for converting metricList to meter system processing. Now skywalking otel-receiver-plugin also does the same. But now the meter service is a metricList in a stream. ```Java @Override public StreamObserver<MeterData> collect(StreamObserver<Commands> responseObserver) { final MeterProcessor processor = processService.createProcessor(); return new StreamObserver<MeterData>() { @Override public void onNext(MeterData meterData) { try (HistogramMetrics.Timer ignored = histogram.createTimer()) { processor.read(meterData); } catch (Exception e) { errorCounter.inc(); log.error(e.getMessage(), e); } } @Override public void onError(Throwable throwable) { processor.process(); log.error(throwable.getMessage(), throwable); responseObserver.onCompleted(); } @Override public void onCompleted() { processor.process(); responseObserver.onNext(Commands.newBuilder().build()); responseObserver.onCompleted(); } }; } ``` If we want to transmit another metricList, we must open another stream. My opinion is to add a service like ``` rpc collect (stream MeterDataList) returns (Commands) { }, ``` so we can use one stream to transmit multiple MeterDataList. -- 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]
