Skip to content
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

Limit analytics send rate #3420

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open

Conversation

NickKhalow
Copy link
Contributor

@NickKhalow NickKhalow commented Feb 24, 2025

Pull Request Description

What does this PR change?

  • Fixed Bug with MAX_BATCH_LIMIT fix MAX_BATCH_SIZE const meilisearch/segment#17 . batcher.rs should be replaced to repo's version when the change is merged.
  • Introduced queue_batcher to replace auto_batcher. Batch sending is manual and requires a trigger from the managed side. It is being triggered periodically per 1 minute in the PR.
  • Added Analytics tab to the debug panel. It displays amount of unflushed batches in the queue and has a button to flush the oldest batch manually.
  • Removed flushAt with 20 value to prevent the overuse of flushing and to distress the web requests.

Test Instructions

Prerequisites

  1. Get access to segment admin panel
  2. Go to the debug tab under Development Unity channel

Test Steps

  1. Launch the client from this branch (test both mac and windows)
  2. Play normally with the opened analytics tab in the debug panel
  3. Validate that changes are being sent per minute and not faster
  4. Try to manually flush your changes with the manual flash button, check the changes are appeared immediately (maybe in 5 seconds due the network and display delays)
  5. Stress test the changes with analytic events (chat, moving, etc) and validate the queue grows in the debug panel

Additional Testing Notes

  • Note any edge cases to verify - stressful events with many players, chatting functionality
  • Mention specific areas that need careful testing - described in the test steps
  • List known limitations or potential issues - no potential issues are known

Quality Checklist

  • [+] Changes have been tested locally
  • [+] Performance impact has been considered

Code Review Reference

Please review our Code Review Standards before submitting.

@NickKhalow NickKhalow requested review from a team as code owners February 24, 2025 09:37
@NickKhalow NickKhalow linked an issue Feb 24, 2025 that may be closed by this pull request
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.

Limit Analytics Send Rate
2 participants