Skip to content

Commit

Permalink
Add gRPC reflection to server
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunSu1768 committed Aug 28, 2024
1 parent 9b1bc4a commit ecb0fbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"otel-trace-reciever/internal/repository"
"otel-trace-reciever/internal/server"
"google.golang.org/grpc/reflection"
"otel-trace-reciever/internal/service"

collectorpb "go.opentelemetry.io/proto/otlp/collector/trace/v1"
Expand All @@ -26,6 +27,8 @@ func main() {
grpcServer := grpc.NewServer()
collectorpb.RegisterTraceServiceServer(grpcServer, traceServer)

reflection.Register(grpcServer)

lis, err := net.Listen("tcp", "0.0.0.0:4317")
if err != nil {
log.Fatalf("Failed to listen: %v", err)
Expand Down

0 comments on commit ecb0fbd

Please sign in to comment.