-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 logs to OpenTelemetry traces #6294
Conversation
74adfc5
to
8a13fe2
Compare
00e61f0
to
99e9ddf
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6294 +/- ##
==========================================
+ Coverage 44.17% 44.21% +0.04%
==========================================
Files 122 122
Lines 13846 13862 +16
==========================================
+ Hits 6116 6129 +13
- Misses 7058 7061 +3
Partials 672 672 |
/retest |
/retest-required |
1 similar comment
/retest-required |
wow very cool! are there guidelines on the format of traces? we had to update prometheus metrics because we didn't specify them efficiently, and I'd like to avoid that with otel if possible |
/retest |
/retest-required |
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.
nice! AFIAK there are no definite guidelines for trace content - and attributes to correlate logs will be useful.
@sallyom: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sallyom, saschagrunert 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 |
99e9ddf
to
e40b3dd
Compare
We now use the log interceptor to enrich the otel traces with additional data. For example we now have detailed logging information from CRI-O and propagate the error to the traces. Signed-off-by: Sascha Grunert <[email protected]>
e40b3dd
to
3168305
Compare
Thank you! PTAL @haircommander |
trace.SpanFromContext(ctx).AddEvent(fmt.Sprintf(format, args...), trace.WithAttributes( | ||
attribute.String("level", level), |
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 log message now goes directly into the events
field, which is streamlined with conmon-rs.
/lgtm |
/override ci/prow/e2e-gcp |
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/override ci/prow/ci-cgroupv2-e2e Seems to be stuck in merge pool 🤔 |
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/ci-cgroupv2-e2e In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
We now use the log interceptor to enrich the otel traces with additional data. For example we now have detailed logging information from CRI-O and propagate the error to the traces.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
For example, the output now looks like this on container creation:
And the error propagation looks like this:
Side note: We need the additional span to capture most of the logs, otherwise we will miss some information (see the error propagation).
cc @sallyom
Does this PR introduce a user-facing change?