Skip to content

fix(tools/looker): log request/response traces at debug, not error#3552

Open
anxkhn wants to merge 1 commit into
googleapis:mainfrom
anxkhn:loop/mcp-toolbox__001
Open

fix(tools/looker): log request/response traces at debug, not error#3552
anxkhn wants to merge 1 commit into
googleapis:mainfrom
anxkhn:loop/mcp-toolbox__001

Conversation

@anxkhn

@anxkhn anxkhn commented Jun 30, 2026

Copy link
Copy Markdown

Description

The looker-get-dashboards and looker-generate-embed-url tools log their
routine "Making request" / "Got response" traces with logger.ErrorContext,
while every other Looker tool logs the same kind of trace with
logger.DebugContext. StdLogger routes Error to stderr, and these two tools
emit the trace on every successful call, so normal, healthy operation produces
ERROR-severity stderr lines: log spam, and false positives for anyone running
log-based alerting. At the default log level the corrected DebugContext lines
are suppressed entirely.

This switches the four calls to DebugContext so they match the package
convention and are debug-only. The looker-get-dashboards function already logs
the response elements at debug one line later, so the edited lines now match
their own surroundings. Message strings are unchanged; this is purely a severity
fix.

PR Checklist

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code -- not opened: this is a small, self-contained
    severity fix. Happy to file one if you'd prefer.
  • Ensure the tests and linter pass -- gofmt, go vet, go build ./...,
    and go test -race on internal/tools/looker/lookergetdashboards,
    internal/tools/looker/lookergenerateembedurl, and internal/log all pass.
  • Code coverage does not decrease -- no behavioral seam changed; the logging
    contract (Debug routes to the out stream and is suppressed at the default
    level; Error routes to the err stream) is already covered by
    internal/log/log_test.go (TestStdLogger).
  • Appropriate docs were updated -- none needed.
  • Make sure to add ! if this involves a breaking change -- not a breaking
    change.

@anxkhn anxkhn requested review from a team as code owners June 30, 2026 20:11
@google-cla

google-cla Bot commented Jun 30, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the logging level in Looker tools (lookergenerateembedurl and lookergetdashboards) from Error to Debug when logging requests and responses. This prevents polluting the error logs with standard operational messages. There are no review comments, and I have no additional feedback to provide.

@NoClueMike NoClueMike left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Looker Cover Up...

@anxkhn anxkhn force-pushed the loop/mcp-toolbox__001 branch from 5a0c54c to 2fa82e5 Compare July 1, 2026 07:40
@drstrangelooker

Copy link
Copy Markdown
Contributor

/gcbrun

@drstrangelooker

Copy link
Copy Markdown
Contributor

@anxkhn please sign the CLA and we should be good to go.

@anxkhn anxkhn closed this Jul 1, 2026
@anxkhn anxkhn reopened this Jul 1, 2026
@anxkhn

anxkhn commented Jul 1, 2026

Copy link
Copy Markdown
Author

@googlebot rescan

@anxkhn

anxkhn commented Jul 1, 2026

Copy link
Copy Markdown
Author

@drstrangelooker I am trying to re trigger cla, looks like I will have to use my @gmail.com which I signed cla with and cannot use 83116240+anxkhn@users.noreply.github.com. Still new to this. Sorry for unnecessary notifications.

The looker-get-dashboards and looker-generate-embed-url tools logged their
"Making request"/"Got response" traces with logger.ErrorContext, while every
other Looker tool logs the same traces with logger.DebugContext. Because
StdLogger routes Error to stderr, these routine, successful traces surfaced as
ERROR-severity stderr lines on every call at the default log level: log spam
and false positives for log-based alerting.

Switch the four calls to DebugContext so they match the package convention and
are suppressed at the default log level. Message strings are unchanged.
@anxkhn anxkhn force-pushed the loop/mcp-toolbox__001 branch from 2fa82e5 to a39eba3 Compare July 1, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants