Skip to content

Commit 350b3a6

Browse files
authored
Merge pull request #6160 from thaJeztah/fix_otel_debug_logs
cli/debug: fix OTELErrorHandler logging messages if there's no error
2 parents 74a896f + 4ea6fbf commit 350b3a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/debug/debug.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ func IsEnabled() bool {
3333
// The default is to log to the debug level which is only
3434
// enabled when debugging is enabled.
3535
var OTELErrorHandler otel.ErrorHandler = otel.ErrorHandlerFunc(func(err error) {
36+
if err == nil {
37+
return
38+
}
3639
logrus.WithError(err).Debug("otel error")
3740
})

0 commit comments

Comments
 (0)