-
Notifications
You must be signed in to change notification settings - Fork 130
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
Deliver each event in a separate request to avoid exceeding payload size limit #424
Conversation
2ae649e
to
d3d338a
Compare
Codecov Report
@@ Coverage Diff @@
## next #424 +/- ##
==========================================
- Coverage 52.79% 52.56% -0.23%
==========================================
Files 66 66
Lines 7594 7590 -4
==========================================
- Hits 4009 3990 -19
- Misses 3585 3600 +15
Continue to review full report at Codecov.
|
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 for looking into this. This changeset handles many of the cases involved in report delivery, however, I can't merge it as-is since there are a few architectural problems to address.
- As far as I've been able to tell, reports that are cancelled via
beforeSend
/beforeNotify
blocks are never deleted now, unless enough new reports are added that they are removed due to file count limits. It could mean hanging around forever. - The naming of the functions and parameters around delivery are often not logically consistent. Some specify plurals where they are now used for single items, others specify "completion" where the block is called many times. In addition, someof the documentation for the blocks no longer match so its not clear where the error lies for future passersby.
Neither of these are hard problems, however it looks like a good candidate for taking a step back and making a more detailed plan for the changes. Rather than going through each change inline, I'll sketch out something to work with. The tests are an excellent scaffold for ensuring that the end result is right, with some additions to ensure that cancelled files are deleted.
Closing as stale. |
Goal
The payload size limit can be exceeded if multiple events are batched together into one request, meaning events are dropped by our API. This changeset removes the batching functionality and sends each event in a separate request to reduce the likelihood of this occurring.
Changeset
sendAllReportsWithCompletion
.BugsnagApiClient
for errors (sessions are still batched together in multiple payloads)Tests