FENCE-2308: Add batching options to tracking options#472
FENCE-2308: Add batching options to tracking options#472alanjcharles14 wants to merge 6 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds batching support to tracking by introducing batchInterval and batchSize options and implementing batching logic in the replay buffer and API client.
- Extends RadarTrackingOptions with batchInterval and batchSize plus JSON (de)serialization.
- Adds batching methods to RadarReplayBuffer and implements them in RadarSimpleReplayBuffer (timer-based flush + size-based flush).
- Integrates batching decision path into RadarApiClient to enqueue instead of sending immediately.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| RadarSimpleReplayBuffer.kt | Implements batching (state vars, add/flush logic, timer scheduling). |
| RadarReplayBuffer.kt | Adds batching method signatures to the interface. |
| RadarTrackingOptions.kt | Adds batchInterval/batchSize fields with JSON keys and defaults. |
| RadarApiClient.kt | Routes certain track requests into batching flow and short‑circuits callback. |
| Radar.kt | Exposes internal batching passthrough methods to replayBuffer. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ShiCheng-Lu
left a comment
There was a problem hiding this comment.
Question on this: wouldn't every track call be a track replay call? Then with the current backend logic, no server events or user will be sent down due to it being a "replay". (there are probably many other things that won't happen that we'll want due to it being a replay)
is there going to be server changes that supplement this?
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds
batchIntervalandbatchSizetotrackingOptionsAdds batch handling logic to
RadarReplayBufferAdds batch check to
RadarAPIClientTesting
batchSizeandbatchIntervalparameters to tracking options in project settingslogs:
