MetricsProxyContainerCluster extends ContainerCluster<MetricsProxyContainer> implements
        ApplicationDimensionsConfig.Producer,
        ConsumersConfig.Producer,
        MonitoringConfig.Producer,
        TelegrafConfig.Producer,
        MetricsNodesConfig.Producer { static String zoneString(Zone zone) { return zone.environment().value() + "." + zone.region().value(); } MetricsProxyContainerCluster(AbstractConfigProducer<?> parent, String name, DeployState deployState); @Override void getConfig(MetricsNodesConfig.Builder builder); @Override void getConfig(MonitoringConfig.Builder builder); @Override void getConfig(ConsumersConfig.Builder builder); @Override void getConfig(ApplicationDimensionsConfig.Builder builder); @Override void getConfig(TelegrafConfig.Builder builder); @Override void getConfig(ThreadpoolConfig.Builder builder); static final Logger log; }
@Test public void hosted_application_propagates_application_dimensions() { VespaModel hostedModel = getModel(servicesWithAdminOnly(), hosted); ApplicationDimensionsConfig config = getApplicationDimensionsConfig(hostedModel); assertEquals(Zone.defaultZone().system().value(), config.dimensions(AppDimensionNames.SYSTEM)); assertEquals(zoneString(Zone.defaultZone()), config.dimensions(PublicDimensions.ZONE)); assertEquals(MY_TENANT, config.dimensions(AppDimensionNames.TENANT)); assertEquals(MY_APPLICATION, config.dimensions(AppDimensionNames.APPLICATION)); assertEquals(MY_INSTANCE, config.dimensions(AppDimensionNames.INSTANCE)); assertEquals(MY_TENANT + "." + MY_APPLICATION + "." + MY_INSTANCE, config.dimensions(PublicDimensions.APPLICATION_ID)); assertEquals(MY_APPLICATION + "." + MY_INSTANCE, config.dimensions(AppDimensionNames.LEGACY_APPLICATION)); }