diff --git a/src/productcatalogservice/main.go b/src/productcatalogservice/main.go index 9fd8b26a39..a123322010 100644 --- a/src/productcatalogservice/main.go +++ b/src/productcatalogservice/main.go @@ -17,13 +17,6 @@ package main import ( "context" "fmt" - "io/ioutil" - "net" - "os" - "strings" - "sync" - "time" - pb "github.com/opentelemetry/opentelemetry-demo/src/productcatalogservice/genproto/hipstershop" "github.com/sirupsen/logrus" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" @@ -31,6 +24,12 @@ import ( "go.opentelemetry.io/otel/metric/global" sdkmetric "go.opentelemetry.io/otel/sdk/metric" healthpb "google.golang.org/grpc/health/grpc_health_v1" + "io/ioutil" + "net" + "os" + "strings" + "sync" + "time" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -48,6 +47,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/reflection" "google.golang.org/grpc/status" ) @@ -151,6 +151,8 @@ func main() { grpc.StreamInterceptor(otelgrpc.StreamServerInterceptor()), ) + reflection.Register(srv) + pb.RegisterProductCatalogServiceServer(srv, svc) healthpb.RegisterHealthServer(srv, svc) srv.Serve(ln)