在Go中将统计处理程序附加到gRPC

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?

stats handler is not fully support in ServeHTTP Handler now.

More details in https://github.com/grpc/grpc-go/issues/1784

(I just noticed that you also filed the issue, but this may help other people also interested in this)