-
Notifications
You must be signed in to change notification settings - Fork 8
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
Offline storage to file system on failed upload #189
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Latest update looking good to me I see the log when a failed harvest is persisted to disk
NewRelic(DEV,0x2804c1640): NRMAOfflineStorage.m:47 -[NRMAOfflineStorage persistDataToDisk:]
Successfully persisted failed upload data to disk for offline storage.
and when a harvest is successful I see the proper logs referencing offline harvests sent now that internet is back.
NewRelic(DEV,0x2804eecc0): NRMAOfflineStorage.m:66 -[NRMAOfflineStorage getAllOfflineData:]_block_invoke
Offline storage to be uploaded from 2023-12-28-10-58-57.txt
NewRelic(DEV,0x2804eecc0): NRMAHarvesterConnection.m:39 -[NRMAHarvesterConnection sendOfflineStorage]
Number of offline data posts: 1
I tested both airplane mode and 100% loss mode (via Network Link Conditioner.
Id say this is ready to be feature flagged behind a "OfflineInstrumentation" or similarly named flag and shipped 👍
Co-authored-by: Chris Dillard <[email protected]>
…r offline in handled exceptions and crashes
…e missed or duplicated reports
a87bd97
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.
Offline Lookin' good!
Please request code review when PR is ready with additional changes. |
This draft for the offline storage has the harvest data that failed to send stored to the local file system when a request has a -1009 or -1001. All of the recorded harvests are then sent immediately after a request succeeds an upload.
Consider also adding -1003, -1004, and -1005.