// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.admin.monitoring;

import com.google.common.collect.ImmutableList;

import static com.yahoo.vespa.model.admin.monitoring.NetworkMetrics.networkMetricSet;
import static com.yahoo.vespa.model.admin.monitoring.SystemMetrics.systemMetricSet;
import static com.yahoo.vespa.model.admin.monitoring.VespaMetricSet.vespaMetricSet;
import static java.util.Collections.emptyList;

/**
 * This class sets up the default 'Vespa' metrics consumer.
 *
 * @author trygve
 * @author gjoranv
 */
public class DefaultMetricsConsumer {

    public static final String VESPA_CONSUMER_ID = "Vespa";

    private static final MetricSet defaultConsumerMetrics = new MetricSet("default-consumer",
                                                                          emptyList(),
                                                                          ImmutableList.of(vespaMetricSet,
                                                                                           systemMetricSet,
                                                                                           networkMetricSet));

    @SuppressWarnings("UnusedDeclaration")
    public static MetricsConsumer getDefaultMetricsConsumer() {
        return new MetricsConsumer(VESPA_CONSUMER_ID, defaultConsumerMetrics);
    }

}

@@ -161,16 +161,64 @@
 oring;%0A%0A
+import ai.vespa.metricsproxy.core.VespaMetrics;%0A
 import c
@@ -762,15 +762,41 @@
 D = 
-%22
 Vespa
-%22
+Metrics.VESPA_CONSUMER_ID.id
 ;%0A%0A 

Use string constant from metrics-proxy to avoid duplication.