tracing: nest per-command spans, drop cache-hit source-image spans - #931
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe timing package now supports child spans. Build snapshot and command execution timing uses those spans. Source-image timing now covers only remote retrieval. ChangesTiming instrumentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1616249 to
6acb868
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
6acb868 to
66c2886
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/image/image_util.go`:
- Around line 105-107: Ensure timing covers every remote image retrieval,
including the cache-miss path inside cachedImage and the direct
RetrieveRemoteImage call. Move the timing instrumentation to the shared
remote-retrieval boundary or add equivalent timing around the call within
cachedImage, while avoiding duplicate spans for a single request.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6688ac6b-282f-4764-a270-10c66f1f04f7
📒 Files selected for processing (3)
pkg/executor/build.gopkg/image/image_util.gopkg/timing/timing.go
Kaniko's build traces come out flat:
pkg/timingparents every span to the rootbuildspan and throws away the child context, so operations that are nested in time render as overlapping siblings. The clearest symptom is the per-command initial FS snapshot appearing to run in parallel with the command it belongs to, which is impossible. This threads context throughpkg/timingso aTimercan spawn child spans, gives command execution its own span, and hangs both the initial snapshot and the execute span under the command span. A command now reads as a parent bar with its sub-steps nested sequentially inside instead of a pile of overlapping bars.Stacked on
mz-otel-instrumentation.Summary by CodeRabbit