Skip to content

Releases: mec07/cloudwatchwriter

Fix nextSendTime and add more tests

16 Oct 20:29
e6ddc2a
Compare
Choose a tag to compare
Add more testing and run tests on windows too (#12)

* Add test for close bug and run on windows

* Don't do coverage on the windows test

* bump the aws sdk version

* Make the tests more robust

* Try without race flag on windows

* send more logs

* set size of expected logs

* Attempt to fix the 10k limit test

* Fix test

* actually fix the test

* Allow the queueMonitor routine time to startup

* Rename test

* make tests more robust

* Add a bit more info to the waitForLogs error

* still repeat the send on close tests

* Add an assertion on the length of time for close

* Speed up final test

* Make 10k test more robust

* bump version

Added a SetErrorHandler method on the CloudWatchWriter to allow user defined error handling

19 Sep 09:47
5c55755
Compare
Choose a tag to compare
Add SetErrorHandler for user defined error handling (#11)

* Add SetErrorHandler for user defined error handling

* Make the tests more robust

* Update the github action

* Remove check of error being nil as it's unnecessary

* Make tests even more robust

* Make tests even more robust as race can really mess with them

Only retry once after an invalid sequence token error

07 May 11:57
435fa22
Compare
Choose a tag to compare
only retry sending a batch after an invalid sequence token once (#8)

* only retry sending a batch after an invalid sequence token once

* minor tweak

* Try editing github workflow yml

* try one more time to fix linter

* Update changelog

Fix for getting out of sync with CloudWatch (InvalidSequenceTokenException problem)

17 Aug 16:14
044b560
Compare
Choose a tag to compare
Fix the invalid sequence token exception (#7)

* Fix the invalid sequence token exception

* Update changelog

* Put in a proper test for an invalid sequence token exception

Speed up shutdown time

15 Aug 12:47
Compare
Choose a tag to compare

Decrease the shutdown time -- the final batch after CloudWatchWriter.Close() has been called will be sent as soon as it has been formed, rather than waiting for the next scheduled batch time.

Remove dependency on zerolog

14 Aug 14:40
48e82d5
Compare
Choose a tag to compare
push the zerolog dependency into the example package (#6)

* push the zerolog dependency into the example package

* Update changelog

Rename package to cloudwatchwriter

14 Aug 14:15
9cb2ae2
Compare
Choose a tag to compare
Rename zerolog2cloudwatch -> cloudwatchwriter (#5)

* zerolog2cloudwatch -> cloudwatchwriter

* Update changelog

* make tests more reliable

* Replace NewWriter with New

Add in 10k limit on number of logs in batch

14 Aug 01:15
7f49945
Compare
Choose a tag to compare

As per this document, there is a 10k limit on the number of logs per batch (as well as some other restrictions, e.g. 1MB batch size) which are already being respected: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html

Sending logs to CloudWatch is now asynchronous

14 Aug 00:06
733dd57
Compare
Choose a tag to compare
Make code asynchronous (#2)

* Made code asynchronous

* Make close block until finished processing messages

* Protect CloudWatchWriter.Err from race conditions

* make tests more readable

* made tests more reliable

Basic synchronous version

13 Aug 15:28
63fb86e
Compare
Choose a tag to compare
Pre-release
Merge pull request #1 from mec07/initial

Basic synchronous implementation just to test that it works