Skip to content

Commit 2adaa52

Browse files
committed
updating Metric validator and CWS.java
1 parent dc6afc7 commit 2adaa52

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

validator/src/main/java/com/amazon/aoc/services/CloudWatchService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class CloudWatchService {
3636
public static final String SERVICE_DIMENSION = "Service";
3737
public static final String REMOTE_SERVICE_DIMENSION = "RemoteService";
3838
public static final String REMOTE_TARGET_DIMENSION = "RemoteTarget";
39+
public static final String CUSTOM_SERVICE_DIMENSION = "service.name";
40+
public static final String CUSTOM_ENVIRONMENT_DIMENSION = "deployment.environment.name";
41+
3942

4043
private static final int MAX_QUERY_PERIOD = 60;
4144
private static final String REQUESTER = "integrationTest";

validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ public void validate() throws Exception {
133133
remoteTargetNames,
134134
expectedMetricList,
135135
actualMetricList);
136+
addMetrics(
137+
CloudWatchService.CUSTOM_SERVICE_DIMENSION,
138+
serviceNames,
139+
expectedMetricList,
140+
actualMetricList);
141+
addMetrics(
142+
CloudWatchService.DEPLOYMENT_ENVIRONMENT_DIMENSION,
143+
Lists.newArrayList("ec2:default"),
144+
expectedMetricList,
145+
actualMetricList);
136146

137147
// remove the skip dimensions
138148
log.info("dimensions to be skipped in validation: {}", skippedDimensionNameList);

0 commit comments

Comments
 (0)