2
0
Эх сурвалжийг харах

Add Athena cloud-integration Error Logging (#3581)

Signed-off-by: HMetcalfeW <106991365+HMetcalfeW@users.noreply.github.com>
Hunter Metcalfe 3 сар өмнө
parent
commit
9c7057c142

+ 2 - 1
pkg/cloud/aws/athenaintegration.go

@@ -74,12 +74,13 @@ func (ai *AthenaIntegration) GetCloudCost(start, end time.Time) (*opencost.Cloud
 
 func (ai *AthenaIntegration) RefreshStatus() cloud.ConnectionStatus {
 	end := time.Now().UTC().Truncate(timeutil.Day)
-	start := end.Add(-7 * timeutil.Day)
+	start := end.Add(-3 * timeutil.Day) // lookback 72 hours
 
 	// getCloudCost already sets ConnectionStatus in the event there is no error, so we don't need to handle the positive
 	// case here
 	_, err := ai.getCloudCost(start, end, 1)
 	if err != nil {
+		log.Errorf("AthenaIntegration: RefreshStatus: error while refreshing status: %s", err.Error())
 		ai.ConnectionStatus = cloud.FailedConnection
 	}