@Override
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
metricsRegistry.snapshot(metricsCollector.addRecord(metricsRegistry.info()), all);
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName)
.setContext(metricsContext);
if (wrapper != null) {
mrb.addGauge(Interns.info(QUEUE_SIZE_NAME, QUEUE_SIZE_DESC), wrapper.getTotalQueueSize())
.addGauge(Interns.info(GENERAL_QUEUE_NAME, GENERAL_QUEUE_DESC),
wrapper.getGeneralQueueLength())
.addGauge(Interns.info(REPLICATION_QUEUE_NAME,
REPLICATION_QUEUE_DESC), wrapper.getReplicationQueueLength())
.addGauge(Interns.info(PRIORITY_QUEUE_NAME, PRIORITY_QUEUE_DESC),