Skip to content

Commit

Permalink
fix(grpc): Chain interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Apr 8, 2024
1 parent 73ffc37 commit d388e0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ func (x *Xatu) startGrpcServer(ctx context.Context) error {
Time: 1 * time.Minute,
Timeout: 15 * time.Second,
}),
grpc.ChainStreamInterceptor(
grpc.StreamServerInterceptor(grpc_prometheus.StreamServerInterceptor),
),
grpc.ChainUnaryInterceptor(
grpc.UnaryServerInterceptor(grpc_prometheus.UnaryServerInterceptor),
func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
Expand Down

0 comments on commit d388e0e

Please sign in to comment.