You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/11/13 12:00:23 UTC

[GitHub] [rocketmq] mxsm commented on a diff in pull request #5514: [ISSUE #5511]Fix Proxy start up throw NullPointerException

mxsm commented on code in PR #5514:
URL: https://github.com/apache/rocketmq/pull/5514#discussion_r1020890473


##########
proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java:
##########
@@ -69,6 +69,9 @@ public class ProxyMetricsManager implements StartAndShutdown {
     public static ObservableLongGauge proxyUp = null;
 
     public static void initLocalMode(BrokerMetricsManager brokerMetricsManager, ProxyConfig proxyConfig) {
+        if (proxyConfig.getMetricsExporterType() != BrokerConfig.MetricsExporterType.DISABLE) {

Review Comment:
   > This check should also be added in ProxyMetricsManager#start.
   ProxyMetricsManager#start has existed
   



##########
proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java:
##########
@@ -69,6 +69,9 @@ public class ProxyMetricsManager implements StartAndShutdown {
     public static ObservableLongGauge proxyUp = null;
 
     public static void initLocalMode(BrokerMetricsManager brokerMetricsManager, ProxyConfig proxyConfig) {
+        if (proxyConfig.getMetricsExporterType() != BrokerConfig.MetricsExporterType.DISABLE) {

Review Comment:
   > This check should also be added in ProxyMetricsManager#start.
   
   ProxyMetricsManager#start has existed
   



-- 
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: commits-unsubscribe@rocketmq.apache.org

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