-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document retry configuration for rate throttling on log group creation #47
Comments
Boto3 already performs retries on these types of errors. The fact that you're running into these errors means that either you're overloading the API and need to redesign your app to avoid the overloading, or tune the Boto3 retry logic for your needs. You can tune the retry logic by passing a custom Boto3 CloudWatch Logs client to Watchtower. See boto/botocore#1260 for details of how to configure the boto3 retry logic. |
Thanks ! will look into it. |
It seems that the Class -- "watchtower.CloudWatchLogHandler" only takes boto3_session object. You methioned that "You can tune the retry logic by passing a custom Boto3 CloudWatch Logs client to Watchtower". is there an example of how to pass Boto3 CloudWatch Logs client to Watchtower? |
@renlon did you work out how to do this? |
Reopening to track documenting this. |
We are getting a lot of Rate limit exceeded when logging to new log groups that are created dynamically, Would be good to have a sleep/retry on "Rate limit exceeded" exceptions on log group creation - probably should be on:
def _idempotent_create(_callable, *args, **kwargs):
try:
_callable(*args, **kwargs)
except ClientError as e:
if e.response.get("Error", {}).get("Code") != "ResourceAlreadyExistsException":
raise
The text was updated successfully, but these errors were encountered: