-
Notifications
You must be signed in to change notification settings - Fork 153
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
Discard the otel logs #5146
Discard the otel logs #5146
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5146 +/- ##
=======================================
Coverage 22.79% 22.79%
=======================================
Files 412 412
Lines 43827 43832 +5
=======================================
+ Hits 9989 9992 +3
- Misses 33050 33052 +2
Partials 788 788 ☔ View full report in Codecov by Sentry. |
// if control plane's flag monitoring.enabled is false, otel provider logs errors. | ||
// it's no problem but we don't want to see it. | ||
// so we discard the logger. | ||
otel.SetLogger(logr.Discard()) | ||
|
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.
📝 It's ok for now. However, if users want to investigate the otel behavior, it might be necessary.
If so, it would be nice to add the flag on whether to show the log.
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.
Got it, thanks 👍
What this PR does / why we need it:
If the control plane disables the monitoring feature, piped's OTEL TracerProvider logs some errors because the otel collector does not exist.
It's not a problem, but we don't want to see error logs.
So we discard the otel logs.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: