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/07/06 15:25:28 UTC

[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #204: add otel metric export to prometheus in pixiu

AlexStocks commented on a change in pull request #204:
URL: https://github.com/apache/dubbo-go-pixiu/pull/204#discussion_r664658273



##########
File path: pkg/filter/metric/metric.go
##########
@@ -30,33 +32,60 @@ import (
 	"github.com/apache/dubbo-go-pixiu/pkg/common/constant"
 	"github.com/apache/dubbo-go-pixiu/pkg/common/extension"
 	"github.com/apache/dubbo-go-pixiu/pkg/logger"
+	"go.opentelemetry.io/otel/metric"
+	"go.opentelemetry.io/otel/metric/global"
+)
+
+var (
+	totalElapsed int64 = 0

Review comment:
       在 go 里面,初始值为 0 时,不用赋值。因为其默认值就是 0




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