designcourse
designcourse copied to clipboard
Reduce the delay time to send the bulk post
I added @datadog/browser-logs to our website,
As I observed, after the page loaded around 30 seconds, it will send the log to the server.
Unfortunately, our client just spends few seconds on our website so we might miss the log, so how can I configure the time to reduce it?
Just went through the document not found any document for this requirement.
Hello @huydoansg,
The logs are batched before being sent to datadog servers and several conditions can make us flush the batch:
- every 30s
- when the batch reach 50 events
- when the batch is > 16kB
- on visibility hidden or beforeUnload
So when your client leave your website, pending logs should be sent to the server.
Let us know if there is any issue with that.
Thank you for your quick response @bcaudan
My website is mainly displayed in a web view of Mobile Application of our client. So not sure any problem with the web view or not, can it lose the log? But for sure our users might spend a small time on our website. It is very convenient if we can configure the time that sends the bulk - reduce from 30s to a smaller number
https://github.com/DataDog/browser-sdk/issues/767