Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitex启用链路追踪时报错 #19

Closed
bugsmo opened this issue May 9, 2023 · 6 comments
Closed

kitex启用链路追踪时报错 #19

bugsmo opened this issue May 9, 2023 · 6 comments

Comments

@bugsmo
Copy link

bugsmo commented May 9, 2023

我的代码仓库:https://github.com/kalandramo/appdemo

cmd/user/main.go 开启链路追踪时

server.WithSuite(tracing.NewServerSuite()),

build 时会报错

# github.com/kitex-contrib/obs-opentelemetry/tracing
/Users/mac/go/pkg/mod/github.com/kitex-contrib/obs-opentelemetry@v0.2.1/tracing/tracer_client.go:109:63: cannot use metricsAttributes (variable of type []"go.opentelemetry.io/otel/attribute".KeyValue) as []metric.RecordOption value in argument to c.histogramRecorder[ClientDuration].Record
/Users/mac/go/pkg/mod/github.com/kitex-contrib/obs-opentelemetry@v0.2.1/tracing/tracer_server.go:116:63: cannot use metricsAttributes (variable of type []"go.opentelemetry.io/otel/attribute".KeyValue) as []metric.RecordOption value in argument to s.histogramRecorder[ServerDuration].Record
@li-jin-gou
Copy link
Contributor

@rogerogers 这个是 go.opentelemetry.io/otel/attribute 不兼容导致的嘛👀

@li-jin-gou
Copy link
Contributor

@kalandramo go.opentelemetry.io/otel/ 存在 break change,需要适配一下。

@rogerogers
Copy link
Collaborator

@rogerogers 这个是 go.opentelemetry.io/otel/attribute 不兼容导致的嘛👀

是的,gorm的opentelemetry更新到新版了,导致跟这个旧版冲突了,我只更了hertz的,等下我更新下这个。

@rogerogers
Copy link
Collaborator

1.16还是breakchange,其他语言的metric api已经stable了,go的这个还是beta,最近更新频繁

@zstone12
Copy link
Contributor

zstone12 commented May 9, 2023

@kalandramo 临时解决方案可以是将gorm.io/plugin/opentelemetry v0.1.2 的版本降到 v0.1.1

@bugsmo
Copy link
Author

bugsmo commented May 9, 2023

@kalandramo 临时解决方案可以是将gorm.io/plugin/opentelemetry v0.1.2 的版本降到 v0.1.1

好的,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants