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/15 12:30:25 UTC

[GitHub] [dubbo-go] LaurenceLiZhixin opened a new pull request #1459: Fix: metrics、k8s、pprof

LaurenceLiZhixin opened a new pull request #1459:
URL: https://github.com/apache/dubbo-go/pull/1459


   - Default prometheus exporter at :9090
   - Add metrics and metrics with label 's  API  to metrics/prometheus/reporter.go
   - Add metrics filter to default service filters
   - pprof at :6060
   - K8s remote : change the way to get namespace  from env to file
   - K8s remote: add set lable api.


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


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #1459: Fix: metrics、k8s、pprof

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #1459:
URL: https://github.com/apache/dubbo-go/pull/1459#discussion_r709193541



##########
File path: config/root_config.go
##########
@@ -129,6 +131,9 @@ func (rc *RootConfig) Init() error {
 	if err := rc.Consumer.Init(rc); err != nil {
 		return err
 	}
+	go func() {
+		_ = http.ListenAndServe("0.0.0.0:6060", nil)

Review comment:
       为啥要在这里写死端口?




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


[GitHub] [dubbo-go] zhaoyunxing92 commented on a change in pull request #1459: Fix: metrics、k8s、pprof

Posted by GitBox <gi...@apache.org>.
zhaoyunxing92 commented on a change in pull request #1459:
URL: https://github.com/apache/dubbo-go/pull/1459#discussion_r709709019



##########
File path: metrics/prometheus/reporter.go
##########
@@ -57,14 +62,16 @@ const (
 )
 
 var (
-	labelNames       = []string{serviceKey, groupKey, versionKey, methodKey, timeoutKey}
-	namespace        = config.GetApplicationConfig().Name
-	reporterInstance *PrometheusReporter
-	reporterInitOnce sync.Once
+	labelNames             = []string{serviceKey, groupKey, versionKey, methodKey, timeoutKey}
+	namespace              = config.GetApplicationConfig().Name

Review comment:
       我建议namespace单独搞一个吧不要用application的name,prometheus对命名规范有要求的,除非你让用户吧application的name改成下划线链接




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


[GitHub] [dubbo-go] LaurenceLiZhixin commented on a change in pull request #1459: Fix: metrics、k8s、pprof

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #1459:
URL: https://github.com/apache/dubbo-go/pull/1459#discussion_r709216342



##########
File path: config/root_config.go
##########
@@ -129,6 +131,9 @@ func (rc *RootConfig) Init() error {
 	if err := rc.Consumer.Init(rc); err != nil {
 		return err
 	}
+	go func() {
+		_ = http.ListenAndServe("0.0.0.0:6060", nil)

Review comment:
       > 为啥要在这里写死端口?
   
   1. 要么我们规定死,dubbogo的pprof和metrics端口就是固定的端口。
   2. 要么放到配置里面,需要针对可视化监控(metrics、pprof)新搞一个配置结构。之后再完善。




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


[GitHub] [dubbo-go] AlexStocks merged pull request #1459: Fix: metrics、k8s、pprof

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #1459:
URL: https://github.com/apache/dubbo-go/pull/1459


   


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