Skip to content

Commit 36c3c35

Browse files
tobertClaudeCopilot
committed
docs: improve ServeHTTP godoc with backwards compatibility note
Why: Copilot feedback on PR #18 correctly noted that backwards compatibility behavior should be documented in godoc, not just inline comments Approach: Added two lines to godoc explaining OTLP spec routing and backwards compatibility behavior for non-standard paths Learned: API behavior documentation belongs in godoc where users see it Next: Push changes and complete Copilot feedback evaluation Co-Authored-By: Claude <[email protected]> Co-Authored-By: Copilot <[email protected]>
1 parent 13c7683 commit 36c3c35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

otlpserver/httpserver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ func NewHttpServer(cb TraceCallback, stop Stopper) *HttpServer {
3434
}
3535

3636
// ServeHTTP routes requests to the appropriate handler based on URL path.
37+
// Routes /v1/traces to trace handler and /v1/logs to log handler per OTLP spec.
38+
// For backwards compatibility, all other paths are treated as trace endpoints.
3739
func (hs *HttpServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
3840
// Route based on OTLP specification paths
3941
switch req.RequestURI {

0 commit comments

Comments
 (0)