-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SkyWalking meter format in OpenTelemetry collector #6210
Comments
@liqiangz Could you take a look about this? |
I think as same as OpenTelemetry logging, we could accept supporting their native format, or adding our native meter exporter to there, or both. |
Now the interface provided by MeterReportService is One period data through one stream. There is no problem with a small amount of data as the agent. However, when a large amount of data is transmitted from the server to the server, the overhead of frequently creating streams is very large. Maybe we can provide a encapsulated request like opencensus, so that we can use keep-alive-stream to improve performance. The follow is the benchmark in https://github.com/liqiangz/opentelemetry-collector-contrib/blob/log-3/exporter/skywalkingexporter/skywalking_benchmark_test.go
and opencensus proto
@wu-sheng @kezhenxu94 @mrproliu Could you please give some suggestions about this? |
@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. |
@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. @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
so we can use one stream to transmit multiple MeterDataList. |
Another solution is to implement format conversion in skywalking like otel-receiver-plugin, so that using the otlp protocol for transmission, there is no need for a metriclist in a stream. But I prefer to implement the previous solution, so that if there is a large batch of data import later, this interface can be reused. |
OK, so you means entity reused, right? The metricList includes metrics from one entity? |
@wu-sheng Yes, and the new rpc interface Do you think we can add a new grpc service like this? If can, I will use this to complete this issue. |
Yes, I think it is reasonable to add. We need to review protocol first. |
@liqiangz What is your progress? There is another update about OTEL's native metrics format, open-telemetry/opentelemetry-specification#2104. It seems finally being stable. |
And I noticed, implementation of apache/skywalking-data-collect-protocol#56 has not been updated in OAP side. Is that coming soon? |
I should be able to finish it in this week. |
Reopen this, as OpenTelemetry side work is still in TODO status. |
@wu-sheng I have submitted a pr in opentelemetry open-telemetry/opentelemetry-collector-contrib#6528. Gauge, Sum, Histogram have been supported. However, the Summary type is not yet supported for two reasons: 1. Protocol does not support summary 2. Mal does not support summary |
Thanks. And yes, we don't support summary directly. |
@wu-sheng |
Could you be more clear about what you can't do in SampleFamily? |
@wu-sheng We converted the Histogram data into the data of the |
The codes of Prometheus fetcher was added first, but little used because most use OpenTelemetry collector or Satellite to do that. So, you could add |
Ok, I will put the label directly. |
Thanks. Later(after that gets merged), we could discuss where we should describe these labels in the documents. I think you have seen the v9 is coming, so, we have enough time about this new input. |
@liqiangz Any update about this at OpenTelemetry collector side? |
It’s still under review. I guess it should be possible to be merged within a week. |
@wu-sheng the pr has been merged. open-telemetry/opentelemetry-collector-contrib#6528 |
Cool! We should update this doc as well, https://skywalking.apache.org/docs/main/latest/en/setup/backend/backend-meter/#meter-collection |
Okay, I will update the document in these two days. |
Rename Also, this doc should be updated, https://skywalking.apache.org/docs/main/latest/en/setup/backend/opentelemetry-receiver/#opentelemetry-receiver. All existing parts belong to OpenCensus exporter, we should guide users to meter doc page if they want to use SkyWalking Exporter. |
As we discussed today, I open this issue to track the progress about adopting the native(GA recently?) native metrics format from OpenTelemetry collector. We should support to transfer the data to our MetricFamily, and MAL engine could support this consistently.
The text was updated successfully, but these errors were encountered: