-
Notifications
You must be signed in to change notification settings - Fork 165
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
Send packet only with POST method. #470
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #470 +/- ##
============================================
- Coverage 87.12% 86.99% -0.14%
+ Complexity 364 358 -6
============================================
Files 32 32
Lines 1429 1422 -7
Branches 165 162 -3
============================================
- Hits 1245 1237 -8
- Misses 115 116 +1
Partials 69 69 ☔ View full report in Codecov by Sentry. |
int packets = (int) Math.ceil(events.size() * 1.0 / PAGE_SIZE); | ||
List<Packet> freshPackets = new ArrayList<>(packets); | ||
for (int i = 0; i < events.size(); i += PAGE_SIZE) { | ||
List<Event> batch = events.subList(i, Math.min(i + PAGE_SIZE, events.size())); | ||
final Packet packet; | ||
if (batch.size() == 1) packet = buildPacketForGet(batch.get(0)); |
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.
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.
I don't remember why I did it this way 🤔.
Might have been an optimization, i.e. GET
having less overhead than POST
for single events. In hindsight I don't think the overhead would be huge enough to warrant both GET and POST.
I'm neutral on this change.
@nostromoo Please consider adding some descriptions to your PRs. What made you change this?
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.
Like @d4rken I'm neutral on this change too.
We can give it a try
@nostromoo Please keep me informed |
Now I see the linked #468. Did something change on the server-side? According to docs (the last time I checked) the server should accept both GET and POST. 🤷 This could warrant further debugging to find out why If it's the later, changing the SDK seems like the wrong way to fix it 😁. |
I did it |
Any suggestion what's the right way |
Check if single @mattab Did the server's behavior for |
Closes #468