Repository navigation
cri/tracing: introduce Phase 1 lifecycle tracing MVP - #12226
Cindia-blue wants to merge 1 commit into
Conversation
|
Hi @Cindia-blue. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
9732623 to
1814d20
Compare
b60b02c to
87bd918
Compare
5d5aed4 to
a09f724
Compare
9fa3daf to
1da5c06
Compare
fuweid
left a comment
There was a problem hiding this comment.
This is a new feature, but it includes some refactoring changes that aren’t necessary for this update. I’ve left several comments about this — please remove the unnecessary refactoring changes.
For new exporters, please add unit tests for them.
| } | ||
|
|
||
| defer func() { | ||
| if unpacker == nil { |
There was a problem hiding this comment.
in order to keep it as simple as possible in first patch, we can handle this in that follow-up.
| } | ||
| return | ||
| } | ||
| c <- ExitStatus{ |
There was a problem hiding this comment.
it looks like it's not relevant. please revert it.
| ctx, span := tracing.StartSpan(ctx, tracing.Name("client.task", "Start"), | ||
| tracing.WithAttribute("task.id", t.ID())) | ||
| defer span.End() | ||
| if ns, err := namespaces.NamespaceRequired(ctx); err == nil { |
There was a problem hiding this comment.
I don't think we need this for CRI. CRI are using that fixed namespace - k8s.io - in containerd.
|
|
||
| span.SetAttributes( | ||
| tracing.Attribute("image.ref", ref), | ||
| tracing.Attribute(tracing.AttrImageRef, ref), |
There was a problem hiding this comment.
I think we can skip this refactor in your change, as there are many attribute names that currently don’t have corresponding constant variables.
| return nil, fmt.Errorf("unable to resolve snapshotter: %w", err) | ||
| } | ||
| span.SetAttributes(tracing.Attribute("snapshotter.name", snapshotterName)) | ||
| span.SetAttributes(tracing.Attribute(tracing.AttrSnapshotter, snapshotterName)) |
There was a problem hiding this comment.
keep that name as it is: using snapshotter.name
| return nil | ||
| } | ||
|
|
||
| log.L.Infof("Initializing tracing with config: Enabled=%v, SamplingRate=%f", |
There was a problem hiding this comment.
| log.L.Infof("Initializing tracing with config: Enabled=%v, SamplingRate=%f", | |
| log.L.Infof("Initializing tracing with config: SamplingRate=%f", |
It's already enabled.
| } | ||
|
|
||
| // GetSandboxIDResolverForExport returns the resolver for use by exporters. | ||
| func GetSandboxIDResolverForExport() func(map[string]interface{}) (string, bool) { |
There was a problem hiding this comment.
is this function used in somewhere ?
| // Add sandbox attributes to span | ||
| span.SetAttributes( | ||
| tracing.Attribute("sandbox.id", id), | ||
| tracing.Attribute(tracing.AttrSandboxID, id), |
There was a problem hiding this comment.
keep it as it's: using sandbox.id
| return "", false | ||
| } | ||
|
|
||
| tracing.SetSandboxIDResolver(resolver) |
There was a problem hiding this comment.
Yes, we do need it here to ensure trace context completeness when it’s missing.
| } | ||
| } | ||
| if len(errs) > 0 { | ||
| return fmt.Errorf("multiple errors during shutdown: %v", errs) |
There was a problem hiding this comment.
| return fmt.Errorf("multiple errors during shutdown: %v", errs) | |
| return fmt.Errorf("multiple errors during shutdown: %w", errors.Join(errs)) |
|
@Cindia-blue could you please use rebase instead of merge? and also, please squash into few commits. thanks! |
|
I will take a look
…On Thu, Nov 6, 2025 at 6:42 AM Fu Wei ***@***.***> wrote:
*fuweid* left a comment (containerd/containerd#12226)
<#12226 (comment)>
@Cindia-blue <https://github.com/Cindia-blue> could you please use rebase
instead of merge? and also, please squash into few commits. thanks!
—
Reply to this email directly, view it on GitHub
<#12226 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKGN7QEAT3XZFQ7W6HKCJL33NM5VAVCNFSM6AAAAACEPB75O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOJXGU3TMMRRGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…tion Signed-off-by: Cindy Li <[email protected]>
done |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed. |
|
@Cindia-blue Are you still intending to contribute here? Looks like this PR needs to be rebased if so. |
|
will handle it.
Samuel Karp ***@***.***> 于2026年3月11日周三 10:51写道:
… *samuelkarp* left a comment (containerd/containerd#12226)
<#12226 (comment)>
@Cindia-blue <https://github.com/Cindia-blue> Are you still intending to
contribute here? Looks like this PR needs to be rebased if so.
—
Reply to this email directly, view it on GitHub
<#12226 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKGN7TXIQ6LSQA3JHOZZVT4QGRQRAVCNFSM6AAAAACEPB75O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DANBRGAYTCNRUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
yours sincerely, xin hui
|\ _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_) fL
|
|
Looks like this still needs a rebase. |
|
Closing the loop on this older proposal: the focused tracing changes were split out and merged in #12628, #12737, and #13959. I am retiring this broad PR rather than rebasing the remaining custom tracing manager/exporter/configuration framework. This PR itself has not been merged, and those three smaller PRs do not imply acceptance of the full framework. Thank you @fuweid, @estesp, and @samuelkarp for the review and guidance. |
This commit proposes a standardized tracing API for containerd CRI
entry points to improve observability of container lifecycle operations.
Highlights:
internal operations (CNI, snapshotter, runtime tasks, mounts)
Phase 1 focuses on CRI operations with low overhead and clean
abstractions, providing a foundation for future extensions (CNI,
image service, runtime).