Skip to content

[log] Add debug logging to config/config_tracing.go#7599

Merged
lpcox merged 1 commit into
mainfrom
log/enhance-ttl-cache-581209c7fac96379
Jun 16, 2026
Merged

[log] Add debug logging to config/config_tracing.go#7599
lpcox merged 1 commit into
mainfrom
log/enhance-ttl-cache-581209c7fac96379

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Adds 3 meaningful debug log calls to internal/config/config_tracing.go to improve observability of the tracing configuration pipeline.

Changes

Added logTracingCfg = logger.New("config:config_tracing") and 3 log calls:

  1. Default service name applied — logs when RegisterDefaults fills in the missing ServiceName field with "mcp-gateway"
  2. stdin OpenTelemetry config converted — logs entry into the RegisterStdinConverter callback with a summary of which fields are present (hasEndpoint, hasServiceName, hasTraceID)
  3. Default service name in converter — logs when the stdin converter also falls back to the default service name

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-finished passed (format ✓, build ✓, lint ✓, all Go tests ✓)
  • Only internal/config/config_tracing.go is modified — single-file PR
  • No test files modified
  • Logger follows pkg:filename convention: "config:config_tracing"
  • Log arguments contain only boolean flags (no secrets, no side-effectful calls)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • index.crates.io

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "index.crates.io"

See Network Configuration for more information.

Generated by Go Logger Enhancement · 2.8K AIC · ⊞ 34.8K ·

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>
@github-actions github-actions Bot added automation enhancement New feature or request labels Jun 16, 2026
@lpcox lpcox marked this pull request as ready for review June 16, 2026 17:04
Copilot AI review requested due to automatic review settings June 16, 2026 17:04

Copilot AI 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.

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

@lpcox lpcox merged commit 84e1f96 into main Jun 16, 2026
24 checks passed
@lpcox lpcox deleted the log/enhance-ttl-cache-581209c7fac96379 branch June 16, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants