code: function Metric(namespace, units, defaultDimensions, options) {
    var self = this;
    self.cloudwatch = new CloudWatch(_awsConfig);
    self.namespace = namespace;
    self.units = units;
    self.defaultDimensions = defaultDimensions || [];
    self.options = Object.assign({}, DEFAULT_METRIC_OPTIONS, options);
    self._storedMetrics = [];
    this._summaryData = new Map();
  
    if (self.options.enabled) {
      self._interval = setInterval(() => {
        self._sendMetrics();
      }, self.options.sendInterval);
  
      this._summaryInterval = setInterval(() => {
        this._summarizeMetrics();
      }, this.options.summaryInterval);
    }
  }
docs: Create a custom CloudWatch Metric object that sets pre-configured dimensions and allows for
  customized metricName and units. Each CloudWatchMetric object has it's own internal
  AWS.CloudWatch object to prevent errors due to overlapping callings to
  AWS.CloudWatch#putMetricData.
  
  @param {String} namespace         CloudWatch namespace
  @param {String} units             CloudWatch units
  @param {Object} defaultDimensions (optional) Any default dimensions we'd
  like the metric to have.
  @param {Object} options           (optional) Options used to control metric
  behavior.
  @param {Bool} options.enabled   Defaults to true, controls whether we
  publish the metric when `Metric#put()` is called - this is useful for
  turning off metrics in specific environments.