Closed bogdandrutu closed 6 years ago
@bogdandrutu thank you for filing this issue!
Should be enabled on the same port as the one we use in oc interceptor.
If I may ask, why are we enabling zPages on the same port as the OC interceptor running a gRPC server? It is definitely trivial to do but I am just wonder why the same port. Thanks.
@odeke-em because it is easier for users to remember only one port. If not possible we can have a different port. As far as I know gRPC supports multiplexing on the same port and I thought this is how we want people to use the zpages in general.
Gotcha. In deed, gRPC supports multiplexing on the same port. The only problem is that if running locally without a TLS enabled connection the detection for multiplexing that they recommend is quite buggy and doesn't work and they also spell that out in their docs. https://godoc.org/google.golang.org/grpc#Server.ServeHTTP
if r.ProtoMajor == 2 && strings.HasPrefix(
r.Header.Get("Content-Type"), "application/grpc") {
grpcServer.ServeHTTP(w, r)
} else {
yourMux.ServeHTTP(w, r)
}
r.ProtoMajor == 2
doesn't work well in case someone decides t
and that's going to be for majority of the cases for people deploying the agent locally or within local networks.
This is not about building zpages for the intercepted spans, it is about enabling zpages for the ocagent process.
Should be enabled on the same port as the one we use in oc interceptor.