[log] Add debug logging to config/config_tracing.go#7599
Merged
Conversation
Log key events during tracing config processing: - When the default service name is applied via RegisterDefaults - When an OpenTelemetry config block is converted from stdin JSON - When the default service name is applied inside the stdin converter These logs help troubleshoot tracing configuration issues by making it visible when defaults kick in vs. explicit configuration is used. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves observability of the tracing configuration pipeline by adding debug logging to the tracing config registration and stdin conversion paths in the config package. It helps diagnose whether tracing config was parsed/applied (and when defaults were filled) without changing functional behavior when debug logging is disabled.
Changes:
- Added a dedicated debug logger for tracing config (
config:config_tracing). - Logged when the default tracing service name is applied during defaults registration.
- Logged when stdin OpenTelemetry config is converted, including boolean presence of key fields, and when the converter falls back to the default service name.
Show a summary per file
| File | Description |
|---|---|
| internal/config/config_tracing.go | Adds a tracing-config debug logger and three debug log statements around defaulting and stdin conversion to aid troubleshooting. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
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 3 meaningful debug log calls to
internal/config/config_tracing.goto improve observability of the tracing configuration pipeline.Changes
Added
logTracingCfg = logger.New("config:config_tracing")and 3 log calls:RegisterDefaultsfills in the missingServiceNamefield with"mcp-gateway"RegisterStdinConvertercallback with a summary of which fields are present (hasEndpoint,hasServiceName,hasTraceID)Why
These callbacks fire during config load and are silent today. When tracing is misconfigured (wrong endpoint, missing service name, trace-ID validation failure later in the pipeline) there is no debug signal showing whether the tracing block was ever parsed from stdin at all. These three lines fill that gap.
Validation
make agent-finishedpassed (format ✓, build ✓, lint ✓, all Go tests ✓)internal/config/config_tracing.gois modified — single-file PRpkg:filenameconvention:"config:config_tracing"Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
index.crates.ioSee Network Configuration for more information.