-
Notifications
You must be signed in to change notification settings - Fork 11
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
Batch events #8
Batch events #8
Conversation
Changed to not null
- InitOptions in separated file with more options - Normalized ' and " - Private fields - Not null when possible - Handle logs - Add storage to persist events (offline and acumulate before send in batch) - Add lifecycle to check if the app went to inactive or paused states - Send events in batch to endpoint events - If an error happened, check to try again or discard events
Hi @goenning I've been hosting the Aptabase in a small VPS and it is handling huge requests. Please check it out and give your feedback. Thank you. |
Hi @GabrielRozendo thanks for the PR, just letting you know that I'll have a look at it this week :) |
Hi @GabrielRozendo seems pretty good to me!
|
Hi @goenning It was only a preview to get your firstly impressions and check if it is going good for you. |
@GabrielRozendo just a heads up that there might be some minor conflicts due to package updates on pubspec.yaml |
@goenning no problem so far and I've found a case. Logs[Aptabase] Checking events, reason: init <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.22.1</center>
</body>
</html> [Aptabase] Checking events, reason: timer <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.22.1</center>
</body>
</html> [Aptabase] Checking events, reason: timer
[Aptabase] Checking events, reason: timer <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.22.1</center>
</body>
</html> [Aptabase] Checking events, reason: timer I'll change this sentence to remove the word successfully. At this point we don't know yet. But my real question here is about that 400 response.
|
Yes, there’s a limit of 25 events per request, so the SDK has to create chunks of up to 25 events before sending the request. |
Hey @goenning Not in progress anymore. |
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.
Thanks @GabrielRozendo!
Let's also update the version of the sdk and add a new entry in the CHANGELOG
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.
We need to update the version of the sdk to 0.4.0:
version: 0.4.0
static const Duration _sessionTimeout = Duration(hours: 1); | ||
Aptabase._(); | ||
|
||
static const _sdkVersion = "[email protected]"; |
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.
static const _sdkVersion = "[email protected]";
Hi, @GabrielRozendo , Thank you again, I gave it a look, but fail to grasp it. |
indeed, the I'm not sure about your specific case but even if you init our storage solution later, as the aptabase init it anyway, I'm not sure if it is a real problem. Maybe you'd have two diff storage solution (one for Aptabase and other for you app).
In example/main.dart in PR #13 I've included one using SharedPreferences. |
Refactoring:
InitOptions
in a separated file with more options.'
and"
.Add:
In this moment, using Hive but could be implement using anything.