-
Notifications
You must be signed in to change notification settings - Fork 266
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
在SDK API请求中支持context.Context #513
Labels
Comments
这个功能支持起来恐怕有些困难。content.Context 是最近版本才支持的功能。老版本的用户会 break。 |
context 在 Go 1.7 版就被纳入官方标准库了,而 https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/go.mod 声明的已经是 如果想保持 API 兼容性的话,可以仿照标准库的做法,比如: package net
func (d *Dialer) Dial(network, address string) (Conn, error) {
return d.DialContext(context.Background(), network, address)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我们有时候需要集成trace tool,比如OpenTelemetry,来跟踪阿里服务的请求响应情况,但是目前所有API的Request都没有context.Context参数,难以做到per request trace。当然,如果可以做到和OpenTelemetry集成的内置支持就更好了。
The text was updated successfully, but these errors were encountered: