refactor metrics uploader
fix require paths
test for Metrics::IntervalBuilder