Skip to content

feat(analytics): implement event sampling and stabilize secure storag…#433

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
shogun444:feat/analytics-sampling
May 27, 2026
Merged

feat(analytics): implement event sampling and stabilize secure storag…#433
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
shogun444:feat/analytics-sampling

Conversation

@shogun444
Copy link
Copy Markdown
Contributor

Summary

Implemented analytics event sampling to reduce non-critical event volume and stabilized secure storage test isolation behavior.

Closes #266

Changes

Analytics Sampling

  • Added 10% sampling for non-critical analytics events
  • Preserved 100% tracking for critical events:
    • auth events
    • crash/error reporting
    • course and quiz lifecycle events
  • Added statistical sampling validation tests across 2,000 runs
  • Verified expected sampling distribution boundaries

Secure Storage Test Stability

  • Added secure storage verification reset helper
  • Improved test isolation and mock rejection handling
  • Prevented mock leakage across test scopes
  • Removed redundant initialization paths causing flaky behavior

Lint & CI Cleanup

  • Fixed ESLint import ordering issues
  • Removed unused React require from jest.setup.js
  • Replaced default logger imports with named imports

Validation

  • Passed ESLint with 0 errors and 0 warnings
  • Passed analytics and secure storage test suites
  • Verified stable sampling behavior and isolated secure storage execution

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@shogun444 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit 0e3713f into rinafcode:main May 27, 2026
0 of 4 checks passed
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.

Implement analytics sampling to reduce event volume on servers

2 participants