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

using x-ray with aws-sdk-v2 makes the binary files bigger than expected #470

Open
kuadrosx opened this issue Jun 7, 2024 · 1 comment
Open

Comments

@kuadrosx
Copy link

kuadrosx commented Jun 7, 2024

Hello,

I was migrating from aws-sdk-v1(in July 31, 2024 it will be in maintance mode) to aws-sdk-v2 and I noticed that the binary files got twice its size.

Using https://pkg.go.dev/github.com/Zxilly/go-size-analyzer I find out that it was because both sdk version were imported:

| 10.62%  | github.com/aws/aws-sdk-go-v2                 | 3.8 MB | vendor    |
| 6.02%   | github.com/aws/aws-sdk-go                    | 2.1 MB | vendor    |

after finish the migration I continue seeing aws-sdk-go being added to the binary, so using https://github.com/KyleBanks/depth I learn that xray was importing both SDKs.

I reproduced the issue using the sample app defined in this repository and adding 3 more version:

https://github.com/kuadrosx/aws-xray-sdk-go/tree/reproduce-big-files-issue/sample-apps

these are the sizes of each version:

 15M	./http-server-sdk-v1-no-xray
 25M	./http-server-sdk-v1
 11M	./http-server-sdk-v2-no-xray
 34M	./http-server-sdk-v2
 86M	.

I think the expected size should be around 21M or less.

@wangzlei
Copy link
Contributor

wangzlei commented Jun 17, 2024

Yes, the xray go sdk still using aws-sdk-v1 for sampling, it cause aws-sdk-v2 only customer's binary has to include aws-sdk-v1 dependencies.

I create an issue that migrate aws sdk v1 in sampling module to net/http #473

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

2 participants