add new tracing proposal#628
Conversation
add Co-authored-by: WWKKAA <1938897817@qq.com> add Co-authored-by: WWKKAA <1938897817@qq.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Ⅰ. 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.