implement grpc gateway and addl handler support
This commit is contained in:
@ -50,6 +50,15 @@ func (a *appGRPCServer) prepGRPCServer(spanCtx context.Context) error {
|
||||
a.registerGRPCServices(ctx)
|
||||
span.SetAttributes(attribute.Int("grpc.server.grpcservices", len(a.opts.Services)))
|
||||
|
||||
// If a grpc-gateway mux was created, store it in opts
|
||||
// so it can be used by AppHTTP
|
||||
if a.gatewayMux != nil {
|
||||
a.opts.SetGatewayMux(a.gatewayMux)
|
||||
span.SetAttributes(attribute.Bool("grpc.server.grpcgateway.enabled", true))
|
||||
} else {
|
||||
span.SetAttributes(attribute.Bool("grpc.server.grpcgateway.enabled", false))
|
||||
}
|
||||
|
||||
// Enable reflection if desired
|
||||
if a.opts.EnableReflection {
|
||||
reflection.Register(a.server)
|
||||
|
Reference in New Issue
Block a user