apache / dubbo

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

[Feature] Allow modules to extend Dubbo application configuration #14308

Open walklown opened 3 weeks ago

walklown commented 3 weeks ago

Pre-check

Search before asking

Apache Dubbo Component

Java SDK (apache/dubbo)

Descriptions

Allow modules to extend Dubbo application configuration to support custom configuration in other modules. For example, I expect to define MetricsConfig in the dubbo-metrics module and PromethusConfig in the dubbo-metrics-promethus module. And in the future, I expect to define OtlpConfig in dubbo-metrics-export-otlp.

Related issues

Separate the code for indicator monitoring Refector Metric export

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

Code of Conduct

walklown commented 3 weeks ago

Example : https://github.com/walklown/dubbo-pr/commit/043561fe9fb79c762876f89cd6e428a8a4f12b39

Question :

  1. AbstractConfig can be removed so that the Config class will be more generic . Is this improvement necessary? I hope to get some suggestions
  2. Is SPI a good way to implement extended configuration classes? Any better suggestions?
AlbumenJ commented 2 weeks ago

@chickenlj @CrazyHZM @icodening @EarthChen @oxsean PTAL