-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Propagate trace contexts to shims #10186
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
Conversation
486b0a5 to
1898361
Compare
cmd/containerd-shim-runc-v2/main.go
Outdated
| "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
d3b91c9 to
2c694a1
Compare
2c694a1 to
36f6bbd
Compare
|
Rebased |
| @@ -1,17 +1,625 @@ | |||
| cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | |||
| cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | |||
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.
Woah... go mod tidy did this...
|
/test pull-containerd-node-e2e |
core/runtime/v2/shim.go
Outdated
|
|
||
| "github.com/containerd/containerd/v2/pkg/atomicfile" | ||
| "github.com/containerd/containerd/v2/pkg/dialer" | ||
| "github.com/containerd/ttrpc" |
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.
nit: Are the imports properly ordered in this file. Not related to this change, but seems like the above packages should be part of the 3rd group
|
@cpuguy83 Do you still want to get this in for 2.0? If so it needs a rebase. |
36f6bbd to
da71d6d
Compare
|
Rebased |
|
@cpuguy83 needs another rebase. |
da71d6d to
3474392
Compare
|
Rebased. |
|
Ah, |
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>
3474392 to
17d4a13
Compare
|
Rebased. |
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.