Closed talha5389 closed 3 years ago
First of all thanks for this, I gave it a look and looks fine.
Are you already using this code somewhere in your infrastructure?
Yes. We have hundred of devices that are logging to cloudwatch. Each device with its own stream but they start daily at some time. We were having issues with limits of DescribeLogStream.
One fix was this pull request changes, that reduces number of requests by 50% and then we further randomly distributed calls for winston logger creation within interval of X minutes to distribute this api call requests
I've just published winston-cloudwatch@2.5.0 with these changes, thanks for the contribution and sorry for the delay :]
This could help to have only 1 DescribeLog calls instead of 2 if a user is sure that loggroup is present