StackdriverConfig(GoogleCanaryServiceIntegration googleSvc) { enabled = googleSvc.isStackdriverEnabled(); metadataCachingIntervalMS = googleSvc.getMetadataCachingIntervalMS(); } }
StackdriverConfig(GoogleCanaryServiceIntegration googleSvc) { enabled = googleSvc.isStackdriverEnabled(); metadataCachingIntervalMS = googleSvc.getMetadataCachingIntervalMS(); } }
@Override protected AbstractCanaryAccount buildAccount(Canary canary, String accountName) { GoogleCanaryAccount account = (GoogleCanaryAccount)new GoogleCanaryAccount().setName(accountName); account.setProject(project).setJsonPath(jsonPath); account.setBucket(bucket).setBucketLocation(bucketLocation); account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder()); GoogleCanaryServiceIntegration googleCanaryServiceIntegration = (GoogleCanaryServiceIntegration)CanaryUtils.getServiceIntegrationByClass(canary, GoogleCanaryServiceIntegration.class); if (googleCanaryServiceIntegration.isStackdriverEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.METRICS_STORE); } if (googleCanaryServiceIntegration.isGcsEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.CONFIGURATION_STORE); account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.OBJECT_STORE); } return account; }
@Override protected AbstractCanaryAccount buildAccount(Canary canary, String accountName) { GoogleCanaryAccount account = (GoogleCanaryAccount)new GoogleCanaryAccount().setName(accountName); account.setProject(project).setJsonPath(jsonPath); account.setBucket(bucket).setBucketLocation(bucketLocation); account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder()); GoogleCanaryServiceIntegration googleCanaryServiceIntegration = (GoogleCanaryServiceIntegration)CanaryUtils.getServiceIntegrationByClass(canary, GoogleCanaryServiceIntegration.class); if (googleCanaryServiceIntegration.isStackdriverEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.METRICS_STORE); } if (googleCanaryServiceIntegration.isGcsEnabled()) { account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.CONFIGURATION_STORE); account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.OBJECT_STORE); } return account; }
googleCanaryServiceIntegration.setStackdriverEnabled(isSet(stackdriverEnabled) ? stackdriverEnabled : googleCanaryServiceIntegration.isStackdriverEnabled()); googleCanaryServiceIntegration.setMetadataCachingIntervalMS(isSet(metadataCachingIntervalMS) ? metadataCachingIntervalMS : googleCanaryServiceIntegration.getMetadataCachingIntervalMS()); if (googleCanaryServiceIntegration.isStackdriverEnabled()) { googleCanaryServiceIntegration.getAccounts().forEach(a -> a.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.METRICS_STORE)); } else {
googleCanaryServiceIntegration.setStackdriverEnabled(isSet(stackdriverEnabled) ? stackdriverEnabled : googleCanaryServiceIntegration.isStackdriverEnabled()); googleCanaryServiceIntegration.setMetadataCachingIntervalMS(isSet(metadataCachingIntervalMS) ? metadataCachingIntervalMS : googleCanaryServiceIntegration.getMetadataCachingIntervalMS()); if (googleCanaryServiceIntegration.isStackdriverEnabled()) { googleCanaryServiceIntegration.getAccounts().forEach(a -> a.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.METRICS_STORE)); } else {