spm custom metrics api client