cjphaha commented on a change in pull request #243:
URL: https://github.com/apache/dubbo-go-samples/pull/243#discussion_r709822055
##########
File path: tracing/dubbo/go-server/cmd/server.go
##########
@@ -26,49 +26,41 @@ import (
)
import (
- _ "dubbo.apache.org/dubbo-go/v3/cluster/cluster_impl"
- _ "dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/common/logger"
- _ "dubbo.apache.org/dubbo-go/v3/common/proxy/proxy_factory"
"dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/filter/filter_impl"
- _ "dubbo.apache.org/dubbo-go/v3/protocol/dubbo"
- _ "dubbo.apache.org/dubbo-go/v3/registry/protocol"
- _ "dubbo.apache.org/dubbo-go/v3/registry/zookeeper"
+ _ "dubbo.apache.org/dubbo-go/v3/imports"
hessian "github.com/apache/dubbo-go-hessian2"
+ "github.com/apache/dubbo-go-samples/tracing/dubbo/go-server/pkg"
+
"github.com/opentracing/opentracing-go"
zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
"github.com/openzipkin/zipkin-go"
zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
-)
-import (
- "github.com/apache/dubbo-go-samples/tracing/dubbo/go-server/pkg"
+ "github.com/uber/jaeger-client-go"
+ jaegerConfig "github.com/uber/jaeger-client-go/config"
)
var (
survivalTimeout = int(3e9)
)
-// they are necessary:
-// export CONF_PROVIDER_FILE_PATH="xxx"
-// export APP_LOG_CONF_FILE="xxx"
func main() {
-
+ config.SetProviderService(new(pkg.UserProvider))
hessian.RegisterPOJO(&pkg.User{})
- config.Load()
-
- initZipkin()
+
config.Load(config.WithPath("./tracing/dubbo/go-server/conf/dubbogo.yml"))
initSignal()
Review comment:
这里会阻塞住 initZipkin() 的运行吗?
##########
File path: tracing/dubbo/go-server/cmd/server.go
##########
@@ -26,49 +26,41 @@ import (
)
import (
- _ "dubbo.apache.org/dubbo-go/v3/cluster/cluster_impl"
- _ "dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/common/logger"
- _ "dubbo.apache.org/dubbo-go/v3/common/proxy/proxy_factory"
"dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/filter/filter_impl"
- _ "dubbo.apache.org/dubbo-go/v3/protocol/dubbo"
- _ "dubbo.apache.org/dubbo-go/v3/registry/protocol"
- _ "dubbo.apache.org/dubbo-go/v3/registry/zookeeper"
+ _ "dubbo.apache.org/dubbo-go/v3/imports"
hessian "github.com/apache/dubbo-go-hessian2"
+ "github.com/apache/dubbo-go-samples/tracing/dubbo/go-server/pkg"
Review comment:
同上
##########
File path: tracing/dubbo/go-client/cmd/client.go
##########
@@ -27,59 +27,44 @@ import (
)
import (
- _ "dubbo.apache.org/dubbo-go/v3/cluster/cluster_impl"
- _ "dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/common/logger"
- _ "dubbo.apache.org/dubbo-go/v3/common/proxy/proxy_factory"
"dubbo.apache.org/dubbo-go/v3/config"
- _ "dubbo.apache.org/dubbo-go/v3/filter/filter_impl"
- _ "dubbo.apache.org/dubbo-go/v3/protocol/dubbo"
- _ "dubbo.apache.org/dubbo-go/v3/registry/protocol"
- _ "dubbo.apache.org/dubbo-go/v3/registry/zookeeper"
+ _ "dubbo.apache.org/dubbo-go/v3/imports"
hessian "github.com/apache/dubbo-go-hessian2"
- "github.com/dubbogo/gost/log"
+ "github.com/apache/dubbo-go-samples/tracing/dubbo/go-client/pkg"
Review comment:
这个放在第三个 import 块比较好
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]