apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.44k stars 26.42k forks source link

[Task] Monitoring indicators support otel format indicator export #13902

Open songxiaosheng opened 7 months ago

songxiaosheng commented 7 months ago

Pre-check

Search before asking

Apache Dubbo Component

Java SDK (apache/dubbo)

Descriptions

Currently, dubbo indicators support the use of micromter, but do not support the export of otel format. They need to be compatible with the otel format exporter.

Related issues

No response

Are you willing to submit a pull request to fix on your own?

Code of Conduct

ShenFeng312 commented 7 months ago

may be we can use export adapter like spring-boot

ShenFeng312 commented 7 months ago

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/otlp/OtlpMetricsExportAutoConfiguration.java

glmapper commented 7 months ago

I would like to take over this task, please assign it to me. @songxiaosheng

glmapper commented 6 months ago

I finished the initial coding and testing, here are my design ideas and some sample data, I hope to submit it to the community and then discuss it together!

  1. add new module dubbo-metrics/dubbo-metrics-otlp,the primary purpose is to introduce a dependency

    <dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-otlp</artifactId>
    </dependency>
  2. Same as the default and prometheus, provide OtlpMetricsReporter and OtlpMetricsReporterFactory to support otlp protocol format data.

  3. there are no other changes, if you want use otlp, pls config dubbo.metrics.protocol=otlp to appoint you protocol type

consumer site promethues protocol data:

metrics-prometheus.json

consumer site otlp protocol data: metrics-otlp.json

songxiaosheng commented 6 months ago

Okay, you can submit a PR