Snow-kal commented on code in PR #3231:
URL: https://github.com/apache/dubbo-go/pull/3231#discussion_r2936187073
##########
protocol/dubbo3/dubbo3_invoker.go:
##########
@@ -112,19 +112,24 @@ func NewDubboInvoker(url *common.URL) (*DubboInvoker,
error) {
opts = append(opts,
triConfig.WithGRPCMaxCallRecvMessageSize(maxCallRecvMsgSize))
opts = append(opts,
triConfig.WithGRPCMaxCallSendMessageSize(maxCallSendMsgSize))
- //TODO: Temporary compatibility with old APIs, can be removed later
- tracingKey := url.GetParam(constant.TracingConfigKey, "")
- if tracingKey != "" {
- tracingConfig := config.GetTracingConfig(tracingKey)
- if tracingConfig != nil {
+ if tracingConfRaw, ok := url.GetAttribute(constant.TracingConfigKey);
ok {
+ tracingConfig, ok := tracingConfRaw.(*global.TracingConfig)
+ if !ok {
+ logger.Warnf("invalid tracing config type %T, expected
*global.TracingConfig", tracingConfRaw)
+ } else if tracingConfig != nil {
if tracingConfig.Name == "jaeger" {
- if tracingConfig.ServiceName == "" {
- tracingConfig.ServiceName =
config.GetApplicationConfig().Name
+ serviceName := tracingConfig.ServiceName
Review Comment:
感谢建议 dubbo3_invoker.go 和 dubbo3_protocol.go 均已修改
(以下截图 第一张是dubbo3_invoker.go 第二张是 dubbo3_protocol.go )
<img width="1835" height="888" alt="image"
src="https://github.com/user-attachments/assets/1b4b28d5-6fbf-4be8-a658-b6e3925a9ccc"
/>
<img width="2085" height="1064" alt="image"
src="https://github.com/user-attachments/assets/2d1a2b3c-a857-4933-93c7-288df7ee34c4"
/>
--
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]