diff --git a/core/corehttp/gateway.go b/core/corehttp/gateway.go index a2567d8f0fd..a1576517697 100644 --- a/core/corehttp/gateway.go +++ b/core/corehttp/gateway.go @@ -62,7 +62,12 @@ func HostnameOption() ServeOption { } childMux := http.NewServeMux() - mux.Handle("/", gateway.NewHostnameHandler(config, backend, childMux)) + + var handler http.Handler + handler = gateway.NewHostnameHandler(config, backend, childMux) + handler = otelhttp.NewHandler(handler, "HostnameGateway") + + mux.Handle("/", handler) return childMux, nil } }