Skip to content

Add no_tracing tag#6750

Merged
dmcgowan merged 1 commit intocontainerd:mainfrom
mxpv:tracing
Apr 4, 2022
Merged

Add no_tracing tag#6750
dmcgowan merged 1 commit intocontainerd:mainfrom
mxpv:tracing

Conversation

@mxpv
Copy link
Copy Markdown
Member

@mxpv mxpv commented Mar 31, 2022

Tracing plugin pulls in a few heavy vendor dependencies, which is not always a requirement.
For cases, when tracing is not needed, this PR adds no_tracing build tag to exclude it at build time.

Signed-off-by: Maksym Pavlenko [email protected]

Signed-off-by: Maksym Pavlenko <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 31, 2022

Build succeeded.

@kzys
Copy link
Copy Markdown
Member

kzys commented Apr 1, 2022

Looks good to me. Would it impact the binary size? More about trimming down unneeded code just in case?

@mxpv
Copy link
Copy Markdown
Member Author

mxpv commented Apr 1, 2022

Looks good to me. Would it impact the binary size?

The binary size wasn't the goal for my case. But

❯ make bin/containerd
 bin/containerd
❯ du -sh bin/containerd
 23M	bin/containerd

❯ make bin/containerd BUILDTAGS=no_tracing
 bin/containerd
❯ du -sh bin/containerd
 22M	bin/containerd

Slightly less.

More about trimming down unneeded code just in case?

In my specific case I'm getting lots go mod conflicts when there are 2 imports which depend on different versions of opentelemetry (like containerd and k8s.io/component-base/traces)

@dmcgowan dmcgowan merged commit e079e4a into containerd:main Apr 4, 2022
@mxpv mxpv deleted the tracing branch April 4, 2022 16:53
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

Successfully merging this pull request may close these issues.

3 participants