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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user