What does LLVM Xray handler do?

New to LLVM. I am not sure how to use the LLVM Xray handler given in the xray_interface.h. What exactly does xray handler do?