Add virtcontainers trace support#617
Conversation
|
PSS Measurement: Memory inside container: |
Codecov Report
@@ Coverage Diff @@
## master #617 +/- ##
==========================================
+ Coverage 64.69% 65.16% +0.46%
==========================================
Files 84 84
Lines 9558 9835 +277
==========================================
+ Hits 6184 6409 +225
- Misses 2726 2769 +43
- Partials 648 657 +9 |
|
Build failed (third-party-check pipeline) integration testing with
|
|
Given the amount of code this touches, it would be great to get this reviewed sooner rather than later to avoid "rebase hell" if code changes underneath this PR... :) |
| } | ||
|
|
||
| testingImpl.CreateSandboxFunc = func(sandboxConfig vc.SandboxConfig) (vc.VCSandbox, error) { | ||
| testingImpl.CreateSandboxFunc = func(ctx context.Context, sandboxConfig vc.SandboxConfig) (vc.VCSandbox, error) { |
There was a problem hiding this comment.
I wonder if wouldn't be better to define a global context variable instead of modify all the functions
There was a problem hiding this comment.
might be something like traceContext ..
There was a problem hiding this comment.
I did think about that (and in fact did use that technique in virtcontainers/hack/virtc/main.go), but I'd rather we use the recommended approach and minimise globals where possible.
|
recheck |
|
Build failed (third-party-check pipeline) integration testing with
|
|
Ping @egernst. |
Set a tag on the root span to denote the subsystem refers to the runtime. Signed-off-by: James O. D. Hunt <[email protected]>
Simplify code slightly be creating a `trace()` function. Signed-off-by: James O. D. Hunt <[email protected]>
Add a `context.Context` parameter to all the virtcontainers API's to support tracing. Signed-off-by: James O. D. Hunt <[email protected]>
Create spans for all `virtcontainers` API functions. Signed-off-by: James O. D. Hunt <[email protected]>
Use the `networkLogger()`, not the network-specific `cnmLogger()`. Signed-off-by: James O. D. Hunt <[email protected]>
Add additional `context.Context` parameters and `struct` fields to allow trace spans to be created by the `virtcontainers` internal functions, objects and sub-packages. Note that not every function is traced; we can add more traces as desired. Fixes kata-containers#566. Signed-off-by: James O. D. Hunt <[email protected]>
18755b9 to
bc83fb1
Compare
|
PSS Measurement: Memory inside container: |
|
Build failed (third-party-check pipeline) integration testing with
|
|
awesome. @jodh-intel to ease stable handling, do you think we should consider separating out the agent change from the VC changes? It makes it a bit easier to track a whole PR for applicability. WDYT? |
|
@egernst Is this going to be a stable candidate? |
bc83fb1 to
d0679a6
Compare
|
Ping @kata-containers/runtime - please can you review?? |
|
Build failed (third-party-check pipeline) integration testing with
|
|
PSS Measurement: Memory inside container: |
|
Errm, checking the F27 CI log: WTF? I didn't add any depends-on...? That message looks like "repository" is actually /me puts another coin in the slot and pulls the handle... |
|
@amshinde, @bergwolf, @sboeuf, @egernst, @WeiZhang555 - ptal.... |
|
recheck |
|
restarting jenkins-ci-fedora-27-vsocks |
|
Talked about in 12/17/18 meeting (kata-herding) |
`dep check` is being run by our CI to make sure that the dependency files and vendor repositories are in sync. This PR brings them into sync to pass checks. Fixes: kata-containers#617 Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
This PR expands the opentracing support in the runtime, providing increased granularity by adding trace spans to the
virtcontainerspackages.Like the initial PR (#565), the strategy here is to add
context.Contextparameters to allvirtcontainersAPI calls. The specified context replaces the default context created in certain parts of the code and allows trace spans to be created.I've added a
trace()function incli/tracing.gobut most subsystems and subsystem implementations also create their owntrace()method.Tags have been added to spans, mostly via the
trace()functions:componentThis is equivalent to the
sourcelog field (see https://github.com/kata-containers/tests/tree/master/cmd/log-parser#logfile-requirements) and is named this way to conform to the standard(https://github.com/opentracing/specification/blob/master/semantic_conventions.md#span-tags-table).
typeThis is used to provide more information for interface implementations.
Examples:
component=network,typecould becnm.component=hypervisor,typecould beqemu.Fixes #566.
Signed-off-by: James O. D. Hunt [email protected]