Skip to content

Commit

Permalink
fix(http): trace only /api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjules committed Apr 11, 2022
1 parent c7f6b32 commit 14281e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func NewServer(

s.router.Use(ginzap.Ginzap(desugared.Logger, time.RFC3339, true))
s.router.Use(ginzap.RecoveryWithZap(desugared.Logger, true))
s.router.Use(otelgin.Middleware("main"))

s.http = &http.Server{
Addr: s.addr,
Expand All @@ -93,6 +92,7 @@ func (s *Server) RegisterRoutes() {
s.router.GET("/swagger/*any", s.handleSwagger())

api := s.router.Group("/api")
api.Use(otelgin.Middleware("main"))
{
// Version
api.GET("/version", s.handleVersion())
Expand Down

0 comments on commit 14281e7

Please sign in to comment.