-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Propagate trace contexts to shims #10186
base: main
Are you sure you want to change the base?
Conversation
486b0a5
to
1898361
Compare
cmd/containerd-shim-runc-v2/main.go
Outdated
@@ -24,6 +24,7 @@ import ( | |||
"github.com/containerd/containerd/v2/cmd/containerd-shim-runc-v2/manager" | |||
_ "github.com/containerd/containerd/v2/cmd/containerd-shim-runc-v2/task/plugin" | |||
"github.com/containerd/containerd/v2/pkg/shim" | |||
_ "github.com/containerd/containerd/v2/pkg/tracing/plugin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how this affects the output binary size?
Context: #9233 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like ~2MB larger with this import :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine leaving this out (or gated by a tag for debugging purposes?).
Mainly added it to see things working and found it didn't really seem to have an impact in memory usage so I kept it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like its easy to hide it with a build tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we should find a way to drop grpc dependency from the runc shim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gated this by the shim_tracing
tag.
a3d8890
to
d3b91c9
Compare
This adds trace context propagation over the grpc/ttrpc calls to a shim. It also adds the otlp plugin to the runc shim so that it will send traces to the configured tracer (which is inherited from containerd's config). It doesn't look like this is adding any real overhead to the runc shim's memory usage, however it does add 2MB to the binary size. As such this is gated by a build tag `shim_tracing` Signed-off-by: Brian Goff <cpuguy83@gmail.com>
d3b91c9
to
2c694a1
Compare
This adds trace context propagation over the grpc/ttrpc calls to a shim.
It also adds the otlp plugin to the runc shim so that it will send traces to the configured tracer (which is inherited from containerd's config).
It doesn't look like this is adding any real overhead to the runc shim's memory usage.