class CloudWatchEmbeddedMetricsReporter implements Reporter {

    public static String getCloudWatchEmbeddedMetricsJson(String namespace,
                                                          long timestamp,
                                                          Map<String, String> dimensions,
                                                          List<Stat> stats,
                                                          Gson gson) {
        Map<String, Object> embeddedMetricsObject = new HashMap<>();

        /* first add nodes for each dimension in the embedded object since it'll be shared by all stats/metrics */
        dimensions.forEach(embeddedMetricsObject::put);

        /* Each stat is essentially a metric so iterate through each stat (metric).
           We can be confident there are now duplicate stats since handler guarantees that
         */
        List<CloudWatchMetricObject> cwMetricObjects = new ArrayList<>();
        stats.forEach(s -> {
            /* each CloudWatchMetric object will have the overall dimensions at the operation level */
            List<String> allDimensions = new ArrayList<>(dimensions.keySet());
            List<Dimension> statDimensions = tagsToDimensions(s.getTags());
            allDimensions.addAll(statDimensions.stream()
                    .map(Dimension::getName)
                    .collect(Collectors.toList()));

            allDimensions = allDimensions.stream()
                    .distinct()
                    .collect(Collectors.toList());

            /* add dimension name/value to main embedded metrics object */
            statDimensions.forEach(d -> embeddedMetricsObject.put(d.getName(), d.getValue()));

            /* add stat metric info as overall field */
            embeddedMetricsObject.put(s.getName(), s.getValue());

            /* each stat will have a unique CloudWatchMetric object */
            cwMetricObjects.add(new CloudWatchMetricObject(namespace,
                    Collections.singletonList(allDimensions),
                    Collections.singletonList(new MetricPOJO(s.getName(), StandardUnit.None.toString())))
            );

        });

        /* finally add overall node with list of CWMetric objects */
        embeddedMetricsObject.put("_aws", new AWSMetricObject(timestamp, cwMetricObjects));

        return gson.toJson(embeddedMetricsObject);
    }

    public  CloudWatchEmbeddedMetricsReporter(final String namespace,
                                             final List<StatFilter> statFilters);

}