refactored API for collector plugins