mirror of
https://github.com/apache/rocketmq.git
synced 2026-08-30 18:10:44 +08:00
* [ISSUE #5511]Fix Proxy start up throw NullPointerException * do not init exporter when disable do not init exporter when disable * remove unused import remove unused import Co-authored-by: lizhimins <707364882@qq.com>
This commit is contained in:
@@ -516,4 +516,5 @@ public class BrokerMetricsManager {
|
||||
prometheusHttpServer.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class ProxyStartup {
|
||||
}
|
||||
|
||||
private static Options buildCommandlineOptions() {
|
||||
Options options = ServerUtil.buildCommandlineOptions(new Options());
|
||||
Options options = ServerUtil.buildCommandlineOptions(new Options());
|
||||
|
||||
Option opt = new Option("bc", "brokerConfigPath", true, "Broker config file path for local mode");
|
||||
opt.setRequired(false);
|
||||
|
||||
@@ -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) {
|
||||
return;
|
||||
}
|
||||
ProxyMetricsManager.proxyConfig = proxyConfig;
|
||||
LABEL_MAP.put(LABEL_NODE_TYPE, NODE_TYPE_PROXY);
|
||||
LABEL_MAP.put(LABEL_CLUSTER_NAME, proxyConfig.getProxyClusterName());
|
||||
|
||||
Reference in New Issue
Block a user