8000 cli/debug: fix OTELErrorHandler logging messages if there's no error by thaJeztah · Pull Request #6160 · docker/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cli/debug: fix OTELErrorHandler logging messages if there's no error #6160

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

thaJeztah
Copy link
Member

I noticed this in a ticket in the compose issue tracker; with debug logging enabled, the OTEL error-logger may be logging even if there's no error;

DEBU[0000] Executing bake with args: [bake --file - --progress rawjson --metadata-file /tmp/compose-build-metadataFile-1203980021.json --allow fs.read=/home/user/dev/project --allow fs.read=/home/user/dev/project --allow fs.read=/home/user/dev/project/nginx --allow fs.read=/home/user/dev/project]
TRAC[0000] Plugin server listening on @docker_cli_d8df486f78df3b7357995be71bf0cef6
DEBU[0005] otel error                                    error="<nil>"
^CTRAC[0055] Closing plugin server
TRAC[0055] Closing plugin server
DEBU[0055] otel error                                    error="<nil>"
DEBU[0055] otel error                                    error="<nil>"

Update the error-handler to not log if there's no error.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Fix stray "otel error" logs being printed if debug logging is enabled.

- A picture of a cute animal (not mandatory but encouraged)

I noticed this in a ticket in the compose issue tracker; with debug logging
enabled, the OTEL error-logger may be logging even if there's no error;

    DEBU[0000] Executing bake with args: [bake --file - --progress rawjson --metadata-file /tmp/compose-build-metadataFile-1203980021.json --allow fs.read=/home/user/dev/project --allow fs.read=/home/user/dev/project --allow fs.read=/home/user/dev/project/nginx --allow fs.read=/home/user/dev/project]
    TRAC[0000] Plugin server listening on @docker_cli_d8df486f78df3b7357995be71bf0cef6
    DEBU[0005] otel error                                    error="<nil>"
    ^CTRAC[0055] Closing plugin server
    TRAC[0055] Closing plugin server
    DEBU[0055] otel error                                    error="<nil>"
    DEBU[0055] otel error                                    error="<nil>"

Update the error-handler to not log if there's no error.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter
Copy link
codecov-commenter commented Jul 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 54.82%. Comparing base (74a896f) to head (4ea6fbf).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6160      +/-   ##
==========================================
- Coverage   54.83%   54.82%   -0.01%     
==========================================
  Files         364      364              
  Lines       30467    30470       +3     
==========================================
  Hits        16706    16706              
- Misses      12786    12789       +3     
  Partials      975      975              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thaJeztah thaJeztah requested a review from Benehiko July 2, 2025 10:07
@thaJeztah thaJeztah merged commit 350b3a6 into docker:master Jul 2, 2025
117 of 118 checks passed

@thaJeztah thaJeztah deleted the fix_otel_debug_logs branch July 2, 2025 15:41
@thaJeztah thaJeztah modified the milestones: 28.3.1, 28.3.2 Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0