CloudWatch: Logs queries should retry on throttling errors (#92535)
CloudWatch: logs queries should retry on throttling errors
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
|
||||
const (
|
||||
limitExceededException = "LimitExceededException"
|
||||
throttlingException = "ThrottlingException"
|
||||
defaultEventLimit = int64(10)
|
||||
defaultLogGroupLimit = int64(50)
|
||||
logIdentifierInternal = "__log__grafana_internal__"
|
||||
@@ -233,6 +234,9 @@ func (e *cloudWatchExecutor) executeStartQuery(ctx context.Context, logsClient c
|
||||
if errors.As(err, &awsErr) && awsErr.Code() == "LimitExceededException" {
|
||||
e.logger.FromContext(ctx).Debug("ExecuteStartQuery limit exceeded", "err", awsErr)
|
||||
err = &AWSError{Code: limitExceededException, Message: err.Error()}
|
||||
} else if errors.As(err, &awsErr) && awsErr.Code() == "ThrottlingException" {
|
||||
e.logger.FromContext(ctx).Debug("ExecuteStartQuery rate exceeded", "err", awsErr)
|
||||
err = &AWSError{Code: throttlingException, Message: err.Error()}
|
||||
}
|
||||
err = errorsource.DownstreamError(err, false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user