Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
tracing: fix type casting problem in rhttp
Browse files Browse the repository at this point in the history
  • Loading branch information
vascoguita committed Aug 31, 2022
1 parent 29e810c commit f9a2680
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/rhttp/rhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,14 @@ func (s *Server) getHandler() (http.Handler, error) {
handler = triple.Middleware(handler)
}

handler = tracing.Middleware(handler, s.svcs)
ms := map[string]tracing.HttpMiddlewarer{}
for prefix, svc := range s.svcs {
if m, ok := svc.(tracing.HttpMiddlewarer); ok {
ms[prefix] = m
}
}

handler = tracing.Middleware(handler, ms)

return handler, nil
}
Expand Down

0 comments on commit f9a2680

Please sign in to comment.