Skip to content

FENCE-2308: Add batching options to tracking options#472

Open
alanjcharles14 wants to merge 6 commits intomasterfrom
alancharles/fence-2308-batch-track-network-requests
Open

FENCE-2308: Add batching options to tracking options#472
alanjcharles14 wants to merge 6 commits intomasterfrom
alancharles/fence-2308-batch-track-network-requests

Conversation

@alanjcharles14
Copy link
Contributor

@alanjcharles14 alanjcharles14 commented Oct 16, 2025

Adds batchInterval and batchSize to trackingOptions
Adds batch handling logic to RadarReplayBuffer
Adds batch check to RadarAPIClient

Testing

  1. Added batchSize and batchInterval parameters to tracking options in project settings
  2. Added logging (shown below)

logs:
Screenshot 2025-10-20 at 2 08 01 PM

Screenshot 2025-10-20 at 2 06 38 PM Screenshot 2025-10-20 at 2 17 12 PM

Copilot AI review requested due to automatic review settings October 16, 2025 17:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@alanjcharles14 alanjcharles14 changed the title [WIP] FENCE-2308: Add batching options to tracking options FENCE-2308: Add batching options to tracking options Oct 20, 2025
Copy link
Contributor

@ShiCheng-Lu ShiCheng-Lu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants