All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.vespa.metricsproxy.metric.dimensions.ApplicationDimensions Maven / Gradle / Ivy

There is a newer version: 8.441.21
Show newest version
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.metricsproxy.metric.dimensions;

import ai.vespa.metricsproxy.metric.model.DimensionId;

import java.util.Map;

import static ai.vespa.metricsproxy.core.MetricsConsumers.toUnmodifiableLinkedMap;
import static ai.vespa.metricsproxy.metric.model.DimensionId.toDimensionId;

/**
 * Application-specific but node-agnostic dimensions.
 *
 * @author gjoranv
 */
public class ApplicationDimensions {

    private final Map dimensions;

    public ApplicationDimensions(ApplicationDimensionsConfig config) {
        dimensions = config.dimensions().entrySet().stream().collect(
                toUnmodifiableLinkedMap(e -> toDimensionId(e.getKey()), Map.Entry::getValue));
    }

    public Map getDimensions() { return dimensions; }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy