Propagate trace contexts to shims#10186
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.
I wonder how this affects the output binary size?
Context: #9233 (comment)
There was a problem hiding this comment.
Looks like ~2MB larger with this import :(
There was a problem hiding this comment.
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.
Seems like its easy to hide it with a build tag.
There was a problem hiding this comment.
Eventually we should find a way to drop grpc dependency from the runc shim.
There was a problem hiding this comment.
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.
Woah... go mod tidy did this...
|
/test pull-containerd-node-e2e |
core/runtime/v2/shim.go
Outdated
| @@ -31,6 +31,7 @@ import ( | |||
| "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.
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 <[email protected]>
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.