CloudWatchMetricObserver extends BaseMetricObserver { MetricDatum createMetricDatum(Metric metric) { MetricDatum metricDatum = new MetricDatum(); return metricDatum.withMetricName(metric.getConfig().getName()) .withDimensions(createDimensions(metric.getConfig().getTags())) .withUnit("None") .withTimestamp(new Date(metric.getTimestamp())) .withValue(truncate(metric.getNumberValue())); } @Deprecated  CloudWatchMetricObserver(String name, String namespace, AWSCredentials credentials); @Deprecated  CloudWatchMetricObserver(String name, String namespace, AWSCredentials credentials,
                                  int batchSize);  CloudWatchMetricObserver(String name, String namespace,
                                  AWSCredentialsProvider provider);  CloudWatchMetricObserver(String name, String namespace,
                                  AWSCredentialsProvider provider, int batchSize);  CloudWatchMetricObserver(String name, String namespace, AmazonCloudWatch cloudWatch);  CloudWatchMetricObserver(String name, String namespace, AmazonCloudWatch cloudWatch,
                                  int batchSize); @Override void updateImpl(List<Metric> metrics); CloudWatchMetricObserver withTruncateEnabled(boolean truncateEnabled);  }
@Test public void testCreateMetricDatum() throws Exception { }