Skip to content

Commit

Permalink
core/corehttp: wrap hostname option with otelhttp
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jan 16, 2024
1 parent f72c6cf commit e8ecb4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/corehttp/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit e8ecb4d

Please sign in to comment.