Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Isolate and report serialization errors #203

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

rohitpaulk
Copy link
Collaborator

Fixes the second part of #180. First part was handled in #187.

The second surprise was that not only did we lose the events with an unserializable property (the "bad events"), but we also lost an order of magnitude more unrelated "good" events. Any good event in the same Rails process as a bad event had a chance of not making it to our destinations. My unsubstantiated hunch is that if a bad event is enqueued with a .track call, then all events in the batch (good or bad) will fail to make it to Segment servers.

This commit adds error handling for JSON generation, and ensures that
one bad event doesn't affect other good events in a batch.

Fixes #180
@rohitpaulk rohitpaulk changed the title Handle serialization errors to not affect good events Isolate and report serialization errors Jul 29, 2019
@rohitpaulk rohitpaulk requested a review from f2prateek July 29, 2019 16:58
@rohitpaulk rohitpaulk merged commit 328c914 into master Jul 30, 2019
@rohitpaulk rohitpaulk deleted the rohitpaulk/fix-batch-serialization branch July 30, 2019 09:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants