}
private void addGarbageCollectorMetrics(long timestamp, MetricList metrics) {
final List<GarbageCollectorMXBean> beans = ManagementFactory.getGarbageCollectorMXBeans();
for (GarbageCollectorMXBean bean : beans) {
final Tag id = new BasicTag("id", bean.getName());
metrics.add(new Metric(COLLECTION_COUNT.withAdditionalTag(id),
timestamp, bean.getCollectionCount()));
metrics.add(new Metric(COLLECTION_TIME.withAdditionalTag(id),
timestamp, bean.getCollectionTime()));
}