-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add batching based on payload size #110
Comments
What kind of threshold are we looking at keeping payloads below for this ticket? I also assume this would only be relating to POST requests yes? |
Hmm, I think we should make it user-configurable? We will keep increasing the payload size supported by our collectors so this should be tunable I guess depending on the collector version a user is using... |
@alexanderdean what do we in the case of a GET request being too big? Do we bin it or let the collector deal with it? |
Good Q. @fblundun - what does the JS Tracker do? |
Also if the collectors are going to check the size of the payload regardless does this not create a bit of double work? Do all the collectors check payload size? |
Collectors don't formally check payload size. Collectors can reject events which exceed their tolerated payload size. I know we had an issue at one stage where a collector was rejecting an oversized GET and that was backing up the events being sent from the browser. |
The JS Tracker currently doesn't check the size of GETs. For POSTs: this function is used to determine the size of the request body. maxPostBytes is the configurable limit and it defaults to 40000. If a single event is too big, the tracker attempts to fire it once and then forgets about it. Otherwise it gets added to the localStorage queue, along with metadata about its size in bytes. When events are sent in batches, each batch is less than maxPostBytes in size. |
Updated function to get payload size.
Updated function to get payload size.
No description provided.
The text was updated successfully, but these errors were encountered: