refactoring pm/get-innermost-span into method pm/get-span on config objects