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/09/24 07:43:22 UTC

[GitHub] [dubbo-go] zhaoyunxing92 commented on a change in pull request #1467: Config enhance

zhaoyunxing92 commented on a change in pull request #1467:
URL: https://github.com/apache/dubbo-go/pull/1467#discussion_r715387657



##########
File path: metrics/prometheus/reporter.go
##########
@@ -221,20 +218,20 @@ func newPrometheusReporter() metrics.Reporter {
 
 			prom.DefaultRegisterer.MustRegister(reporterInstance.consumerSummaryVec, reporterInstance.providerSummaryVec,
 				reporterInstance.consumerHistogramVec, reporterInstance.providerHistogramVec)
-			metricsExporter, err := ocprom.NewExporter(ocprom.Options{
-				Registry: prom.DefaultRegisterer.(*prom.Registry),
-			})
-			if err != nil {
-				logger.Errorf("new prometheus reporter with error = %s", err)
-				return
-			}
-			go func() {
-				mux := http.NewServeMux()
-				mux.Handle("/metrics", metricsExporter)
-				if err := http.ListenAndServe(":9090", mux); err != nil {
-					logger.Errorf("new prometheus reporter with error = %s", err)
-				}
-			}()
+			//metricsExporter, err := ocprom.NewExporter(ocprom.Options{
+			//	Registry: prom.DefaultRegisterer.(*prom.Registry),

Review comment:
       metrics的配置等我想好这么配置了我们再开通这些吧

##########
File path: config/consumer_config.go
##########
@@ -224,6 +217,22 @@ func NewConsumerConfig(opts ...ConsumerConfigOpt) *ConsumerConfig {
 	return newConfig
 }
 
+///////////////////////////////////// consumer config api

Review comment:
       后面整理吧,之前的代码,跟日志优化一起搞

##########
File path: config/config_center_config.go
##########
@@ -83,13 +83,15 @@ func (c *CenterConfig) check() error {
 	return verify(c)
 }
 
-func (c *CenterConfig) Init(rc *RootConfig) error {

Review comment:
       可以试试看,不会修改的

##########
File path: config/config_center_config.go
##########
@@ -72,19 +71,31 @@ type CenterConfig struct {
 	Params    map[string]string `yaml:"params"  json:"parameters,omitempty"`
 }
 
+// Prefix dubbo.config-center
+func (CenterConfig) Prefix() string {
+	return constant.ConfigCenterPrefix
+}

Review comment:
       先保留这写方法吧,后面用viper了会用到这些方法




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