Skip to content

Commit

Permalink
fix(dummy-judge): Propagate tags to canary analysis result. (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Duftler committed Mar 15, 2018
1 parent 70ec572 commit be8072e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
@ComponentScan({
"com.netflix.kayenta.canary",
"com.netflix.kayenta.config",
"com.netflix.kayenta.events",
"com.netflix.kayenta.external",
"com.netflix.kayenta.index.config",
"com.netflix.kayenta.metrics",
"com.netflix.kayenta.persistence.config",
"com.netflix.kayenta.retrofit.config",
"com.netflix.kayenta.events",
"com.netflix.kayenta.external"
"com.netflix.kayenta.retrofit.config"
})
public class KayentaConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class RandomDummyJudge extends CanaryJudge {
CanaryAnalysisResult.builder()
.name(metricPair.getName)
.id(metricPair.getId)
.tags(metricPair.getTags)
.classification(classification)
.groups(metricConfig.getGroups)
.experimentMetadata(Map("stats" -> DescriptiveStatistics.toMap(experimentStats).asJava.asInstanceOf[Object]).asJava)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ private StringBuilder addScopeFilter(StringBuilder queryBuilder,
addGCEFilters(scopeLabel, scope, projectId, region, filters);
} else if ("aws_ec2_instance".equals(resourceType)) {
addEC2Filters("asg_groupName", scope, region, filters);
} else {
} else if (!StringUtils.isEmpty(resourceType)) {
throw new IllegalArgumentException("There is no explicit support for resourceType '" + resourceType + "'. " +
"You may build whatever query makes sense for your environment via label " +
"bindings and custom filter templates.");
} else {
throw new IllegalArgumentException("Either a resource type or a custom filter is required.");
}
} else {
List<String> customFilterTokens = Arrays.asList(customFilter.split(","));
Expand Down

0 comments on commit be8072e

Please sign in to comment.