bitgorust commented on issue #13684:
URL: https://github.com/apache/dubbo/issues/13684#issuecomment-1911303848

   Since I've read [Configuration Item Reference 
Manual](https://dubbo.apache.org/zh-cn/overview/mannual/java-sdk/reference-manual/config/properties/)
 (BTW, [English 
version](https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/properties/)
 seems not up-to-date neither well typeset) and code relative to 
`MetricsConfig` / `AggregationConfig` / `PrometheusConfig`, I think L280 and 
L282 are no longer necessary here. 
https://github.com/apache/dubbo/blob/2cf54f7947596abbf92f907853a2df7cbfc8b7fb/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java#L279-L283
   
   1. 
[MetricsFilter](https://github.com/apache/dubbo/blob/3.2/dubbo-monitor/dubbo-monitor-default/src/main/java/org/apache/dubbo/monitor/dubbo/MetricsFilter.java)
 is marked `deprecated`. And even it is useful now, `metrics.protocol` and 
`metrics.port` have their own default values respectively.
   2. `port` in 
[MetricsConfig](https://github.com/apache/dubbo/blob/3.2/dubbo-common/src/main/java/org/apache/dubbo/config/MetricsConfig.java)
 is also marked `deprecated`. Nor used in nested 
[PrometheusConfig](https://github.com/apache/dubbo/blob/3.2/dubbo-common/src/main/java/org/apache/dubbo/config/nested/PrometheusConfig.java)
 and 
[AggregationConfig](https://github.com/apache/dubbo/blob/3.2/dubbo-common/src/main/java/org/apache/dubbo/config/nested/AggregationConfig.java)
   3. `enabled` flag only appears in `MetricsConfig` and `TracingConfig` 
according to [Configuration Item Reference 
Manual](https://dubbo.apache.org/zh-cn/overview/mannual/java-sdk/reference-manual/config/properties/).
 In `MetricsConfig`, `enabled` is actually for `AggregationConfig`. In 
`TracingConfig`, `enabled` has its default value. So now I think maybe checking 
`enabled` flag when adding config in `AbstractConfigManager` is not a good 
choice.
   
   Hope this helps.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to