CloudWatch: Remove HighResolution toggle since it's not being used (#20440)

* Remove highres flag since it's not being used

* Remove not used code. Init id field correctly

* Fix broken tests

* Remove GMS related calculations

* Rename period field

* Add breaking changes to changelog. Also update upgrading docs

* Update snapshot

* Update docs after feedback

* Changes after feedback
This commit is contained in:
Erik Sundell
2019-11-20 13:34:44 +01:00
committed by GitHub
parent d1c523838b
commit ec18e2bfc3
23 changed files with 114 additions and 221 deletions
@@ -1,7 +1,6 @@
package cloudwatch
import (
"errors"
"fmt"
"github.com/aws/aws-sdk-go/aws"
@@ -30,11 +29,6 @@ func (e *CloudWatchExecutor) buildMetricDataInput(queryContext *tsdb.TsdbQuery,
ScanBy: aws.String("TimestampAscending"),
}
for _, query := range queries {
// 1 minutes resolution metrics is stored for 15 days, 15 * 24 * 60 = 21600
if query.HighResolution && (((endTime.Unix() - startTime.Unix()) / int64(query.Period)) > 21600) {
return nil, &queryError{errors.New("too long query period"), query.RefId}
}
metricDataQuery, err := e.buildMetricDataQuery(query)
if err != nil {
return nil, &queryError{err, query.RefId}