Skip to content

Commit

Permalink
Allow 0 values to be entered for CloudWatch PutMetricDataNamespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ianneub committed Dec 1, 2014
1 parent 600a214 commit 3e27f5f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,7 @@ func (c *CloudWatch) PutMetricDataNamespace(metrics []MetricDatum, namespace str
if metric.Unit != "" {
params[prefix+".Unit"] = metric.Unit
}
if metric.Value != 0 {
params[prefix+".Value"] = strconv.FormatFloat(metric.Value, 'E', 10, 64)
}
params[prefix+".Value"] = strconv.FormatFloat(metric.Value, 'E', 10, 64)
if !metric.Timestamp.IsZero() {
params[prefix+".Timestamp"] = metric.Timestamp.UTC().Format(time.RFC3339)
}
Expand Down

0 comments on commit 3e27f5f

Please sign in to comment.