Closed romanbsd closed 1 year ago
Hi @romanbsd, thanks for taking the time to review our code!
All three points you mentioned make total sense to me. I'll try to take some time to review them and come up with some changes. That said I can't promise it will be immediately, sorry about that!
For your P.S., what would you use instead? I'm just curious.
I'd just use a plain HttpClient available from Java8 and execute the calls asynchronously. The heavy lifting of JSON serialization is performed by Jackson anyway...
I agree. Fixing batch
is a critical issue.
And with respect to JAX-RS, I agree that ideally you should use the built-in HTTP client. If this were a more elaborate app then I would understand the JAX-RS dependency but for a logger it seems overkill.
Thanks @romanbsd for opening the issue and pinpointing the issues.
In 0.3.0
(see #13), several improvement are implemented:
Vector
collection is usedbatchInterval
), currently defaulting to 3 secondsI'll do some further testing and should it be merged and released in no time.
If you have any more concerns about concurrency, feel free to reopen the issue after it closes, I'll appreciate it 🙏
We are considering to use logtail in production, and I was reviewing the code of the logback-logtail appender. There're a few issues that I noticed from reading the code:
batch
instance member is not a thread safe collection, thus it can lead to thread safety issues.P.S. IMHO using javax.ws.rs.client.Client here is an overkill and it impedes performance.