core/corehttp: wrap hostname option with otelhttp

This commit is contained in:
Henrique Dias 2024-01-16 10:56:00 +01:00
parent f72c6cf983
commit 0ec6308e8b

View File

@ -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
}
}