-
Notifications
You must be signed in to change notification settings - Fork 590
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
Add k8s trace attribute to PingSource #5928
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5928 +/- ##
==========================================
+ Coverage 82.02% 82.30% +0.27%
==========================================
Files 220 225 +5
Lines 7527 7628 +101
==========================================
+ Hits 6174 6278 +104
+ Misses 918 910 -8
- Partials 435 440 +5
Continue to review full report at Codecov.
|
what about other source? |
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.
Added minor comments.
I think result
tag would be very welcomed.
return ctx, func(errOrResult error) { | ||
span.End() | ||
} |
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.
The CE SDK implementation seems to bring a valuable tag to the span:
A result reporter is created per span:
And deferred to check the outcome, depending on it a tag is added:
Do you think something like that could be added to this PR's implementation?
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.
Thanks for bringing this up. The reason I removed the reporter is because it's about metrics, not traces, and I have on my TODO list to check if this is not redundant with stats reporter... and it's not. We need to have it for not breaking the existing behavior (though we don't document it)
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.
Since OpenTelemetry does not support custom resources (yet), I chose what I think are reasonable span attribute names.
Should we propose one before we move too far down our custom names?
For core sources it is tracked in this issue: #5888. Does not apply to SinkBinding and ContainerSource as the adapter is external. I can do APIServerSource in this PR. |
Definitively, though maybe not in the PR as I'm not sure what should be the value. It could be as simple as ACK/NACK, but we may want something more/different. I feel this deserve its own issue, WDYT @odacremolbap ? |
sure, that can go to a different issue. |
The following is the coverage report on the affected files.
|
@odacremolbap I moved everything to the @pierDipi The tracing semantic conventions for k8s are experimental anyway so I wouldn't wait. I'll update the doc to say these are experimental tracing attributes. Is that ok? |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lionelvillard, pierDipi 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 |
/hold @odacremolbap review |
(too late, we can iterate in a follow up) |
) | ||
|
||
var newClientHTTPObserved = cloudeventsobsclient.NewClientHTTP | ||
var newClientHTTPObserved = NewClientHTTPObserved |
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.
nit: maybe newClientHTTPObserved
is no longer needed and can be replaced with the public NewClientHTTPObserved
No worries @pierDipi , this also lgtm. 👍 |
Partial fix for #5888
Since OpenTelemetry does not support custom resources (yet), I chose what I think are reasonable span attribute names.
Proposed Changes
k8s.namespace
,k8s.name
,k8s.resource
).Pre-review Checklist
Release Note
Docs