So I am using a mux that will determine what type of request is incoming (gRPC or REST) and route the request accordingly. For gRPC requests I am attaching a stats handler to collect some metadata but one of the interface methods TagRPC()
which we use to tag our metadata is not being called.
app.httpMux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if isgRPC(r) {
app.gRPCServer.ServeHTTP(w, r)
} else {
app.rMux.ServeHTTP(w, r)
}
})
I think the problem is with gRPC's ServeHTTP method not supporting all the methods. If I were to attach TagGRPC()
manually where would be a good place to do it?