apache / dubbo

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

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

Open walklown opened 5 months ago

walklown commented 5 months 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 5 months 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 4 months ago

@chickenlj @CrazyHZM @icodening @EarthChen @oxsean PTAL