updates go dependencies, refactors config loading precedence, adds gRPC gateway path stripping option, and improves HTTP handler setup.

This commit is contained in:
2025-12-23 13:51:55 -05:00
parent 7cc4e7831e
commit 70e99eef0e
6 changed files with 120 additions and 112 deletions

View File

@@ -64,6 +64,9 @@ func prepHTTPServer(opts *opts.AppHTTP) *http.Server {
if h.Pattern != "" && h.Prefix != "" {
l.Fatal().Str("ExactPath", h.Pattern).Str("Prefix", h.Prefix).
Msg("Can't have both pattern and prefix match for http handler")
} else if h.Pattern == "" && h.Prefix == "" {
l.Fatal().Str("ExactPath", h.Pattern).Str("Prefix", h.Prefix).
Msg("Must have prefix or pattern for http handler")
}
if h.Prefix != "" {
@@ -82,7 +85,7 @@ func prepHTTPServer(opts *opts.AppHTTP) *http.Server {
servePath = h.Pattern
}
mux.Handle(h.Prefix, otelhttp.WithRouteTag(servePath, h.Handler))
mux.Handle(servePath, otelhttp.NewHandler(h.Handler, servePath))
}
// Add OTEL instrumentation, filter noise, set span names