Iterable<MetricsRecordImpl> getMetrics(MetricsBuilderImpl builder, boolean all) {
        builder.setRecordFilter(recordFilter).setMetricFilter(metricFilter);
        synchronized (this) {
            if (lastRecs == null) {
                all = true; // Get all the metrics to populate the sink caches
            }
        }
        source.getMetrics(builder, all);
        for (MetricsRecordBuilderImpl rb : builder) {
            for (MetricsTag t : injectedTags) {
                rb.add(t);
            }
        }
        synchronized (this) {
            lastRecs = builder.getRecords();
            return lastRecs;
        }
    }