Skip to content

Commit

Permalink
Added Zap as the default Error log open-telemetry#11820
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-kavipurapu committed Dec 9, 2024
1 parent 3f3e208 commit 57e4cf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/confighttp/confighttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/noop"
"go.uber.org/zap"
"golang.org/x/net/http2"
"golang.org/x/net/publicsuffix"

Expand Down Expand Up @@ -479,13 +480,14 @@ func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settin
next: handler,
includeMetadata: hss.IncludeMetadata,
}

server := &http.Server{
Handler: handler,
ReadTimeout: hss.ReadTimeout,
ReadHeaderTimeout: hss.ReadHeaderTimeout,
WriteTimeout: hss.WriteTimeout,
IdleTimeout: hss.IdleTimeout,
// Setting the server error logger
ErrorLog: zap.NewStdLog(settings.Logger),
}

return server, nil
Expand Down

0 comments on commit 57e4cf0

Please sign in to comment.