[log] Add debug logging to config_core.go#4074
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Draft
[log] Add debug logging to config_core.go#4074github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…ults - Log undecoded TOML key count before unknown-field validation - Log server count before stdio containerization validation - Log server count before auth configuration validation - Log when opentelemetry config is merged into tracing - Log applied gateway defaults (port, timeouts, keepalive interval) These log calls use the existing logConfig logger and are activated via DEBUG=config:* or DEBUG=* to help diagnose configuration loading issues at startup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds 5 meaningful debug logging calls to
internal/config/config_core.gousing the existinglogConfiglogger ("config:config").Changes
applyGatewayDefaults— logs resolved defaults after all zero-value fields are filled in:LoadFromFile— adds intermediate progress logs between the existing entry/exit log calls:Checking N undecoded TOML keys against allowed fieldsValidating stdio server containerization requirements for N serversValidating auth configuration for N serversopentelemetrysection is present:opentelemetry section found: merging into tracing config, endpoint=...Why
LoadFromFilealready logs at entry and exit but its many intermediate validation steps were invisible under debug logging. These additions make it easy to pinpoint which validation step fails or how far initialization progressed when troubleshooting startup issues withDEBUG=config:*.Validation
go build ./...— passes ✅go vet ./...— passes ✅go test ./internal/...— all packages pass; onlyTestFetchAndFixSchema_NetworkErrorfails, which is a pre-existing network-dependent test failure unrelated to these changes ✅Warning
The following domain was blocked by the firewall during workflow execution:
invalidhostthatdoesnotexist12345.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.