-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 limits for Analytics events resending #590
Add limits for Analytics events resending #590
Conversation
Codecov Report
@@ Coverage Diff @@
## master #590 +/- ##
==========================================
- Coverage 89.15% 89.11% -0.04%
==========================================
Files 69 69
Lines 3219 3226 +7
Branches 611 613 +2
==========================================
+ Hits 2870 2875 +5
- Misses 331 333 +2
Partials 18 18
Continue to review full report at Codecov.
|
@@ -29,6 +29,7 @@ const logger = new Logger('AnalyticsClass'); | |||
const BUFFER_SIZE = 1000; | |||
const MAX_SIZE_PER_FLUSH = BUFFER_SIZE * 0.1; | |||
const interval = 5*1000; // 5s | |||
const RESEND_LIMIT = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these values perhaps be configurable via the pluggable / config since different situations / systems may require different values.
This is to fix this potential bug, right? When I had window.LOG_LEVEL='DEBUG' on but not using Analytics, I noticed this message is fired continuously. {"[DEBUG] 23:50.499 AWSAnalyticsProvider - record event failed. ": Error: Missing region in config amplify version 0.2.14 |
Thanks @powerful23 |
thanks @powerful23 . after your pull request, I don't have to set disabled to false to disable Analytics? |
@Jun711 yes |
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Issue #, if available:
Description of changes:
To avoid infinite retries for Analytics resending events.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.