feat(sdk): The Send Queue stores the sent event in the Event Cache#5920
Merged
Conversation
CodSpeed Performance ReportMerging #5920 will not alter performanceComparing Summary
|
The event has been sent to the server and the server has received it. Yepee! Now, we usually wait on the server to give us back the event via the sync. Problem: sometimes the network lags, can be down, or the server may be slow; well, anything can happen. It results in a weird situation where the user sees its event being sent, then disappears before it's received again from the server. To avoid this situation, this patch eagerly saves the event in the Event Cache. It's similar to what would happen if the event was echoed back from the server via the sync, but we avoid any network issues. The Event Cache is smart enought to deduplicate events based on the event ID, so it's safe to do that.
This patch replaces calls to `SerializableEventContent::from_raw` by `new`: it's simpler and safer as it's not possible to use an invalid event type.
This patch fixes a mention to a `save_send_queue_event` method. It doesn't exist: it's `save_send_queue_request`.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5920 +/- ##
=======================================
Coverage 88.65% 88.65%
=======================================
Files 363 363
Lines 104739 104737 -2
Branches 104739 104737 -2
=======================================
+ Hits 92852 92855 +3
+ Misses 7533 7528 -5
Partials 4354 4354 ☔ View full report in Codecov by Sentry. |
2 tasks
This was referenced Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The event has been sent to the server and the server has received it. Yepee! Now, we usually wait on the server to give us back the event via the sync.
Problem: sometimes the network lags, can be down, or the server may be slow; well, anything can happen. It results in a weird situation where the user sees its event being sent, then disappears before it's received again from the server.
To avoid this situation, this patch eagerly saves the event in the Event Cache. It's similar to what would happen if the event was echoed back from the server via the sync, but we avoid any network issues. The Event Cache is smart enough to deduplicate events based on the event ID, so it's safe to do that.