Closed meganwalker-ibm closed 4 years ago
Ok, thankyou. I await your PR :)
@meganwalker-ibm we have released v3.5.0 with the mentioned changes. Please let us know if you have any concerns or feedback. Thank you again for using our product and your feedback!
On a quiet microservice log lines can be held in buffer for hours or days after a temporary network problem is restored. This can interfere greatly when trying to diagnose an application problem through logs that are expected to be in LogDNA, but are instead buffered waiting to be sent.
This PR changes the behaviour to use a setTimeout for backoff interval when a flush has failed, rather than on the submission of a new message to the buffer. This allows the flush to happen reasonably quickly after a network problem has resolved.
In addition we fix the loading of the
retryTimeout
option intothis._ retryTimeout
.In addition to adding new tests to cover this, there's also some test cleanup that we found helped us to understand the flow of the HTTP Exception test cases - the use of two separate flags
edgeCaseFlag
andcountHits
for what were only ever used to do the job of a boolean, for example.