Skip to content

fix: reduce server log verbosity — skip session in instrument, defaul…#7729

Merged
DOsinga merged 1 commit intoblock:mainfrom
jeffa-block:fix/server-log-verbosity
Mar 9, 2026
Merged

fix: reduce server log verbosity — skip session in instrument, defaul…#7729
DOsinga merged 1 commit intoblock:mainfrom
jeffa-block:fix/server-log-verbosity

Conversation

@jeffa-block
Copy link
Copy Markdown
Contributor

Summary

Two small changes to reduce server log bloat for heavy Goose users:

  1. Skip session in dispatch_tool_call's #[instrument] — the full Session struct (including all message history and base64 image data) was being serialised into every DEBUG log line. Log just session.id instead.
  2. Change server default log level from goose=debug to goose=info — mirrors the CLI fix in fix(cli): avoid debug logging by default in CLI #7569.

The dispatch_tool_call function's #[instrument] macro skips self, tool_call, and request_id, but not session. Since Session implements Debug and contains the full conversation history, every tool call produces two log lines (enter + exit) containing the entire session. Late in a long session with screenshots, individual log lines reach 8+ MB. On my machine, 14 days of server logs totalled 17 GB.

Users can still enable debug logging via RUST_LOG=goose=debug.

Type of Change

  • Bug fix
  • Performance improvement

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Verified the two target lines exist on main and confirmed the changes are syntactically correct. The #[instrument] skip list change is additive (no behaviour change except smaller logs). The log level change matches the identical fix merged for CLI in #7569.

No new tests added — this is a logging config change. Could be validated by checking server log output size before/after.

Related Issues

Relates to #4965 — "logs up to 630 GB per file" (closed, led to rotation fix in #5561)
Relates to #7569 — CLI default changed from debug to info (this PR does the same for the server)
Complements #7490 — propagating session.id to OTel spans (open)

…t to info

The dispatch_tool_call #[instrument] macro was not skipping the session
parameter, causing the entire Session struct (including full message
history and base64 image data) to be serialised into every DEBUG log
line. This produced log lines up to 8 MB each, with server logs growing
1-4 GB/day for heavy users.

Changes:
- Add session to the skip list in dispatch_tool_call's #[instrument],
  log just session.id instead
- Change server default log level from goose=debug to goose=info,
  matching the CLI fix in block#7569

Users can still enable debug logging via RUST_LOG=goose=debug.

Fixes block#4965 (complements the rotation fix in block#5561)
Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

Thanks, I've been wanting to do this for a long time!

@DOsinga DOsinga added this pull request to the merge queue Mar 9, 2026
Merged via the queue into block:main with commit 9ab5c45 Mar 9, 2026
19 checks passed
jh-block added a commit that referenced this pull request Mar 9, 2026
…deps

* origin/main: (34 commits)
  fix: reduce server log verbosity — skip session in instrument, defaul… (#7729)
  fix: provider test infrastructure (#7738)
  fix: sanitize streamable HTTP extension names derived from URLs (#7740)
  refactor: derive GooseMode string conversions with strum (#7706)
  docs: Add Spraay Batch Payments MCP Extension Tutorial (#7525)
  fix: flake.nix (#7224)
  delete goose web (#7696)
  Add @angiejones as CODEOWNER for documentation (#7711)
  Add MLflow integration guide (#7563)
  docs: LM Studio availability (#7698)
  feat: add Avian as an LLM provider (#7561)
  Adds `linux-mcp-server` to the goose registry (#6979)
  fix: add #[serde(default)] to description field on 4 ExtensionConfig variants (#7708)
  feat: combine TUI UX from alexhancock/tui-goodness with publishing config from jackamadeo/package-tui (#7683)
  chore: cleanup old sandbox (#7700)
  Correct windows artifact (#7699)
  gh fall back (#7695)
  fix: restore smart-approve mode (#7690)
  fix: make TLS configurable in goosed agent via GOOSE_TLS env var (#7686)
  Update to rmcp 1.1.0 (#7619)
  ...

# Conflicts:
#	Cargo.lock
wpfleger96 added a commit that referenced this pull request Mar 9, 2026
* origin/main: (21 commits)
  fix(ui-desktop): unify path resolution around GOOSE_PATH_ROOT (#7335)
  fix: pass OAuth scopes to DCR and extract granted_scopes from token response (#7571)
  fix: write to real file if config.yaml is symlink (#7669)
  fix: preserve pairings when stopping gateway (#7733)
  fix: reduce server log verbosity — skip session in instrument, defaul… (#7729)
  fix: provider test infrastructure (#7738)
  fix: sanitize streamable HTTP extension names derived from URLs (#7740)
  refactor: derive GooseMode string conversions with strum (#7706)
  docs: Add Spraay Batch Payments MCP Extension Tutorial (#7525)
  fix: flake.nix (#7224)
  delete goose web (#7696)
  Add @angiejones as CODEOWNER for documentation (#7711)
  Add MLflow integration guide (#7563)
  docs: LM Studio availability (#7698)
  feat: add Avian as an LLM provider (#7561)
  Adds `linux-mcp-server` to the goose registry (#6979)
  fix: add #[serde(default)] to description field on 4 ExtensionConfig variants (#7708)
  feat: combine TUI UX from alexhancock/tui-goodness with publishing config from jackamadeo/package-tui (#7683)
  chore: cleanup old sandbox (#7700)
  Correct windows artifact (#7699)
  ...
wpfleger96 added a commit that referenced this pull request Mar 9, 2026
* origin/main: (21 commits)
  fix(ui-desktop): unify path resolution around GOOSE_PATH_ROOT (#7335)
  fix: pass OAuth scopes to DCR and extract granted_scopes from token response (#7571)
  fix: write to real file if config.yaml is symlink (#7669)
  fix: preserve pairings when stopping gateway (#7733)
  fix: reduce server log verbosity — skip session in instrument, defaul… (#7729)
  fix: provider test infrastructure (#7738)
  fix: sanitize streamable HTTP extension names derived from URLs (#7740)
  refactor: derive GooseMode string conversions with strum (#7706)
  docs: Add Spraay Batch Payments MCP Extension Tutorial (#7525)
  fix: flake.nix (#7224)
  delete goose web (#7696)
  Add @angiejones as CODEOWNER for documentation (#7711)
  Add MLflow integration guide (#7563)
  docs: LM Studio availability (#7698)
  feat: add Avian as an LLM provider (#7561)
  Adds `linux-mcp-server` to the goose registry (#6979)
  fix: add #[serde(default)] to description field on 4 ExtensionConfig variants (#7708)
  feat: combine TUI UX from alexhancock/tui-goodness with publishing config from jackamadeo/package-tui (#7683)
  chore: cleanup old sandbox (#7700)
  Correct windows artifact (#7699)
  ...
wpfleger96 added a commit that referenced this pull request Mar 9, 2026
…e-issue

* origin/main:
  fix(ui-desktop): unify path resolution around GOOSE_PATH_ROOT (#7335)
  fix: pass OAuth scopes to DCR and extract granted_scopes from token response (#7571)
  fix: write to real file if config.yaml is symlink (#7669)
  fix: preserve pairings when stopping gateway (#7733)
  fix: reduce server log verbosity — skip session in instrument, defaul… (#7729)
  fix: provider test infrastructure (#7738)
  fix: sanitize streamable HTTP extension names derived from URLs (#7740)
  refactor: derive GooseMode string conversions with strum (#7706)
  docs: Add Spraay Batch Payments MCP Extension Tutorial (#7525)
  fix: flake.nix (#7224)
  delete goose web (#7696)
  Add @angiejones as CODEOWNER for documentation (#7711)
  Add MLflow integration guide (#7563)
  docs: LM Studio availability (#7698)
  feat: add Avian as an LLM provider (#7561)
  Adds `linux-mcp-server` to the goose registry (#6979)
  fix: add #[serde(default)] to description field on 4 ExtensionConfig variants (#7708)
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.

2 participants