Skip to content

Commit

Permalink
refactor(server.go): remove logging of request details in New function
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Aug 6, 2024
1 parent 0d1c3b1 commit fcca820
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions apps/agent/pkg/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ func New(config Config) *Server {
ctx, span := tracing.Start(hCtx.Context(), "api.request")
defer span.End()

requestId := hCtx.Header("Unkey-Request-Id")
if requestId != "" {
s.logger.Info().Str("requestId", requestId).Str("method", hCtx.Method()).Str("path", hCtx.URL().Path).Int("status", hCtx.Status()).Msg("request started")
}

hCtx.AppendHeader("x-node-id", config.NodeId)

next(huma.WithContext(hCtx, ctx))
Expand All @@ -72,9 +67,6 @@ func New(config Config) *Server {
}).Inc()

prometheus.ServiceLatency.Observe(serviceLatency.Seconds())
if requestId != "" {
s.logger.Info().Str("requestId", requestId).Str("method", hCtx.Method()).Str("path", hCtx.URL().Path).Int("status", hCtx.Status()).Msg("request completed")
}

})

Expand Down

0 comments on commit fcca820

Please sign in to comment.