-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
[3.0] Optimize dubbo:monitor configuration #8477
[3.0] Optimize dubbo:monitor configuration #8477
Conversation
Codecov Report
@@ Coverage Diff @@
## 3.0 #8477 +/- ##
============================================
+ Coverage 62.83% 62.92% +0.08%
- Complexity 311 312 +1
============================================
Files 1112 1112
Lines 46633 46638 +5
Branches 7016 7019 +3
============================================
+ Hits 29303 29347 +44
+ Misses 14067 14034 -33
+ Partials 3263 3257 -6
Continue to review full report at Codecov.
|
} else if (monitor != null) { | ||
address = monitor.getAddress(); | ||
} | ||
if (ConfigUtils.isNotEmpty(address)) { | ||
String protocol = monitor == null ? DUBBO_PROTOCOL : monitor.getProtocol(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set protocol to DUBBO here will cause loading default dubbo monitor when the application didnot have any monitor config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
should be returned in this scene
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll fix it.
What is the purpose of the change
当用户需要自己扩展dubbo-monitor实现后,配置有问题
如配置<dubbo:monitor procotol="myMonitor"/>,monitorUrl=null
如配置<dubbo:monitor procotol="myMonitor" address="ip:port"/>,monitorUrl=dubbo://ip:port,变成了dubbo协议?!
如配置<dubbo:monitor address="myMonitor://ip:port"/>,monitorUrl=myMonitor://ip:port,当如果扩展不需要ip:port呢
Brief changelog
优化了org.apache.dubbo.config.utils.ConfigValidationUtils#loadMonitor,可支持如下配置方式
Checklist