Skip to content

add new tracing proposal#628

Open
Liquorice-Ma wants to merge 1 commit into
openkruise:masterfrom
Liquorice-Ma:tracing-v2
Open

add new tracing proposal#628
Liquorice-Ma wants to merge 1 commit into
openkruise:masterfrom
Liquorice-Ma:tracing-v2

Conversation

@Liquorice-Ma

Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR does

This PR adds a new proposal docs/proposals/20260709-request-id-as-traceid.md that modifies the trace context generation scheme from the 0702 proposal with four key changes:
Root Span creation moved to middleware layer: from individual operation functions in api.go to the HTTP middleware layer (framework.go), unifying trace lifecycle management and covering the full request lifecycle (middleware + handler).
Request ID as TraceID: use the existing HTTP request ID (UUID) directly as the OTel TraceID via a custom IDGenerator, enabling unified trace-log correlation with a single ID.
OTel non-blocking async export confirmation: documents that BatchSpanProcessor provides async batch export, ensuring tracing does not block business logic (manager memory ~28Mi).
Controller span noise optimization (planned): move StartReconcileSpan after the shouldRequeue check to avoid creating meaningless μs-level spans for query-only Reconciles.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Describe how to verify it

Review the proposal document for completeness and consistency with the 0702 proposal.
Verify that the four changes are clearly described with motivation, design, and trade-offs.
Implementation verification is tracked in the proposal's Implementation History section.

Ⅳ. Special notes for reviews

This is a proposal-only PR — no code changes, only docs/proposals/20260709-request-id-as-traceid.md.
The proposal builds on 20260702-sandbox-otel-distributed-tracing.md and should be reviewed in that context.
Items 1–3 are already implemented and verified in the test environment; item 4 (controller span noise optimization) is planned but not yet implemented.

add

Co-authored-by: WWKKAA <1938897817@qq.com>

add

Co-authored-by: WWKKAA <1938897817@qq.com>
@kruise-bot kruise-bot requested review from furykerry and zmberg July 10, 2026 03:37
@kruise-bot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zmberg for approval by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.05%. Comparing base (f057d27) to head (1e6b234).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #628      +/-   ##
==========================================
+ Coverage   80.03%   80.05%   +0.02%     
==========================================
  Files         225      225              
  Lines       17712    17712              
==========================================
+ Hits        14175    14180       +5     
+ Misses       2959     2955       -4     
+ Partials      578      577       -1     
Flag Coverage Δ
unittests 80.05% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants