func UnaryServerInterceptor(log *zap.Logger) grpc.UnaryServerInterceptor {
	return func(parent context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
		service, method := parseServiceAndMethod(info.FullMethod)
		log := log.With(
			zap.String("grpc_service", service),
			zap.String("grpc_method", method))
		ctx := ToContext(parent, log)
		return handler(ctx, req)
	}
}
UnaryServerInterceptor attaches a logger to the context.
package logger
import (
	"context"
	"strings"
	"go.uber.org/zap"
	"google.golang.org/grpc"
	"google.golang.org/grpc/metadata"
)