to name sb / sth to show that you are making a serious promise
swear by sb / sth
to name sb / sth to show that you are making a serious promise
I swear by almighty God that I will tell the truth.
swear by sb / sth
to be certain that sth is good or useful
She swears by meditation as a way of relieving stress.
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition