From b8581615f11b1007cedd3f0c5a8c5c903bfa88b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 23:51:58 +0000 Subject: [PATCH] tracing: add debug logging to config_resolver.go Add logTracing.Printf calls to three functions in config_resolver.go that previously had no logging: - resolveEndpoint: log input endpoint/signalPath, URL-parse fallback path, and resolved result - resolveServiceName: log when using a configured service name - resolveCommaSeparatedExtraEndpoints: log count of valid endpoints parsed Uses the existing package-level logTracing logger (declared in provider.go). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- internal/tracing/config_resolver.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/tracing/config_resolver.go b/internal/tracing/config_resolver.go index de3beac3..17d09db6 100644 --- a/internal/tracing/config_resolver.go +++ b/internal/tracing/config_resolver.go @@ -31,6 +31,8 @@ func resolveEndpoint(cfg *config.TracingConfig) string { signalPath = defaultSignalPath } + logTracing.Printf("resolveEndpoint: endpoint=%q, signalPath=%q", endpoint, signalPath) + u, err := url.Parse(endpoint) if err != nil { // If unparseable, fall back to string append for best-effort. @@ -40,6 +42,7 @@ func resolveEndpoint(cfg *config.TracingConfig) string { if !strings.HasSuffix(normalized, signalPath) { normalized += signalPath } + logTracing.Printf("resolveEndpoint: URL parse failed, using string fallback: result=%q", normalized) return normalized } @@ -50,12 +53,15 @@ func resolveEndpoint(cfg *config.TracingConfig) string { } else { u.Path = normalizedPath } - return u.String() + resolved := u.String() + logTracing.Printf("resolveEndpoint: resolved=%q", resolved) + return resolved } // resolveServiceName returns the service name from config. func resolveServiceName(cfg *config.TracingConfig) string { if cfg != nil && cfg.ServiceName != "" { + logTracing.Printf("resolveServiceName: using configured service name: %q", cfg.ServiceName) return cfg.ServiceName } return config.DefaultTracingServiceName @@ -181,14 +187,16 @@ func resolveExtraEndpointConfigs(cfg *config.TracingConfig) []extraEndpointConfi } func resolveCommaSeparatedExtraEndpoints(raw, signalPath string) []extraEndpointConfig { + parts := strings.Split(raw, ",") var endpoints []extraEndpointConfig - for _, ep := range strings.Split(raw, ",") { + for _, ep := range parts { normalized := normalizeExtraEndpoint(ep, signalPath) if normalized == "" { continue } endpoints = append(endpoints, extraEndpointConfig{URL: normalized}) } + logTracing.Printf("resolveCommaSeparatedExtraEndpoints: parsed %d valid endpoint(s) from %d raw entries", len(endpoints), len(parts)) return endpoints }