-
Notifications
You must be signed in to change notification settings - Fork 41.1k
SyncPod record error and set error status to span when return err is non-nil #125017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyncPod record error and set error status to span when return err is non-nil #125017
Conversation
…not nil Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
/ok-to-test |
/assign @dashpole |
/sig-instrumentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 0459220e1f06514f0338d278b515d0b643c87054
|
/priority important-longterm |
/sig instrumentation |
/assign @sjenning |
@sjenning Hi, do you have time to review this pr? Thanks! |
/triage accepted |
/approve given @dashpole already chimed in and change looks good to me as well. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dashpole, dims, fatsheep9146 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Our team is now using the kubelet tracing feature to calculate the successful rate of

syncPod
by using otel-collector's spanmetric connector. And draw a dashboard like following graphBut we found a flaw that since the span of
syncPod
is not recording error or set span status to Error when the syncPod return's non-nil error, so we could not get correct status of syncPod from span.So I suggest we change the code like following, which will RecordError and SetStatus to codes.Error when err is not nil.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: