tracing: append the OTLP signal path to a path-less endpoint - #1001
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTracing initialization now normalizes OTLP endpoints before exporter creation. It appends ChangesOTLP endpoint normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/tracing/tracing.go (1)
85-88: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd or verify regression tests for endpoint normalization.
Cover path-less endpoints,
/,/v1/traces, another explicit path, and parse failures. Assert the endpoint behavior before exporter creation. This protects the compatibility contract across future exporter or URL-parsing changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/tracing/tracing.go` around lines 85 - 88, Add or verify regression tests around the endpoint normalization logic before exporter creation, covering path-less endpoints, "/", "/v1/traces", another explicit path, and URL parse failures. Assert that only path-less or root endpoints receive "/v1/traces", while explicit paths and parse failures preserve the existing endpoint behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/tracing/tracing.go`:
- Around line 85-88: Add or verify regression tests around the endpoint
normalization logic before exporter creation, covering path-less endpoints, "/",
"/v1/traces", another explicit path, and URL parse failures. Assert that only
path-less or root endpoints receive "/v1/traces", while explicit paths and parse
failures preserve the existing endpoint behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: dc0eeb5a-1b81-4d34-a3eb-0c4ead60f1b8
📒 Files selected for processing (1)
pkg/tracing/tracing.go
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dc9a0e2 to
aadbf8a
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
otlptracehttp1.45.0 changedWithEndpointURL: a URL with no path now targets the root path instead of having/v1/tracesappended. Upstream calls this out as a breaking change (open-telemetry/opentelemetry-go#8538), aligning it withotlploghttpand withOTEL_EXPORTER_OTLP_TRACES_ENDPOINT.We document
KANIKO_TELEMETRY_ENDPOINTas a collector base URL (README.md,docs/telemetry.md), so every path-less endpoint started POSTing to/and getting a 404. Nothing failed: the export error only reaches OTel's global error handler, never logrus, so builds kept passing while emitting no traces. Our own CI stopped delivering spans the moment #996 merged and nobody noticed for 11 hours.Appending the path only when the endpoint carries none keeps both forms working, so an endpoint that already ends in
/v1/tracesis not doubled.Verified end-to-end against a real collector + ClickHouse, with a build run through the executor:
KANIKO_TELEMETRY_ENDPOINThttp://host:4318404 Not Found, 0 spanshttp://host:4318/v1/traces🤖 Generated with Claude Code
Summary by CodeRabbit
/v1/tracespath when no specific path is provided.