winston-cloudwatch icon indicating copy to clipboard operation
winston-cloudwatch copied to clipboard

InvalidParameterException: 1 validation error detected: Value '[]' at 'logEvents' failed to satisfy constraint: Member must have length greater than or equal to 1

Open xtr0 opened this issue 5 years ago • 4 comments

Sometimes they come back - #55

As far as I understand from the code the issue appears if uploadRate is less then the time required to upload logs AND the logStreamName changes between iterations

Simple code to reproduce (and logs): https://github.com/xtr0/issues-winston-cloudwatch/tree/change-logstreamname-upload-iterations-overlap

PS: winston-cloudwatch 2.3.2 & winston 3.3.3

xtr0 avatar Aug 13 '20 12:08 xtr0

to be honest I don't think it will be an issue in a real scenario as nobody will change logStreamName on every call... I got this error while was doing some synthetic test

xtr0 avatar Aug 13 '20 12:08 xtr0

I will mark this as bug nonetheless as it may be suggesting a deeper problem in the implementation.

Thanks for opening this issue.

lazywithclass avatar Aug 23 '20 17:08 lazywithclass

Yup same here, getting the error

lvillacin avatar Mar 05 '22 14:03 lvillacin

this fix the issue for me https://github.com/StenAL/winston-cloudwatch/pull/1 (based on https://github.com/lazywithclass/winston-cloudwatch/pull/214 to test)

fwiw it does happen when logStream name changes

that fix doesn't feel right, I think there's probably something deeper to fix, maybe something around log events loosing their log stream name target when the log stream changes between the event is buffered and the upload is triggered.

rawpixel-vincent avatar Mar 19 '23 08:03 rawpixel-vincent