Adapt CollecTor to metrics-lib 1.9.0

This focuses on the changes made in #22141 (moved).