diagnose function

Get diagnostic metadata on a target.