You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/19 10:09:30 UTC

[GitHub] [dubbo] guohao commented on a change in pull request #8477: [3.0] Optimize dubbo:monitor configuration

guohao commented on a change in pull request #8477:
URL: https://github.com/apache/dubbo/pull/8477#discussion_r691974351



##########
File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
##########
@@ -304,29 +306,35 @@ public static URL loadMonitor(AbstractInterfaceConfig interfaceConfig, URL regis
         AbstractConfig.appendParameters(map, monitor);
         AbstractConfig.appendParameters(map, application);
         String address = null;
-        String sysaddress = System.getProperty("dubbo.monitor.address");
-        if (sysaddress != null && sysaddress.length() > 0) {
-            address = sysaddress;
+        String sysAddress = System.getProperty(DUBBO_MONITOR_ADDRESS);
+        if (sysAddress != null && sysAddress.length() > 0) {
+            address = sysAddress;
         } else if (monitor != null) {
             address = monitor.getAddress();
         }
-        if (ConfigUtils.isNotEmpty(address)) {
+        String protocol = monitor == null ? DUBBO_PROTOCOL : monitor.getProtocol();

Review comment:
       Set protocol to DUBBO here will cause loading default dubbo monitor when the application didnot have any monitor config.




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org