[log] Add debug logging to internal/cmd/tracing.go - #11650
Conversation
Add debug log calls to ensureTracingConfig and applyTracingOverrides to help troubleshoot tracing configuration decisions (empty config init, whether overrides are needed, sample-rate override, and resulting endpoint/serviceName). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds debug visibility to tracing configuration override paths.
Changes:
- Logs tracing initialization and override decisions.
- Logs sample-rate overrides and skip paths.
Show a summary per file
| File | Description |
|---|---|
internal/cmd/tracing.go |
Adds tracing configuration debug logs. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
🔒 mcpg Read-Only Stress — gVisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes leaked. FAIL condition was not triggered.
|
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations Tool catalog: 23 tools exposed — all read-only. Zero write tools registered (GITHUB_READ_ONLY=1 backend enforcement).
Overall: INCONCLUSIVE
Run: §32586131675
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes succeeded in any part. Result is INCONCLUSIVE (not FAIL) — same methodology gap as the default and gvisor runs for this workflow.
|
Summary
Adds meaningful debug logging to
internal/cmd/tracing.go, specifically toensureTracingConfigandapplyTracingOverrides, which previously had zero debug logging despite containing real control-flow branching around tracing configuration.Changes
Using the file's existing shared
debugLoglogger (logger.ForFile(), declared ininternal/cmd/root.go):ensureTracingConfig: log when the gateway's tracing config is nil and gets lazily initialized.applyTracingOverrides:shouldInitTracingConfigdecision before branching.No function signatures changed; log arguments only reference already-computed local variables (no side effects introduced).
Validation
go build -o awmg .— succeedsgo vet ./internal/cmd/...— cleango test ./internal/cmd/...— passingNotes
Per the workflow constraints, exactly 1 file was modified and no test files were touched.