status-im / status-go

The Status module that consumes go-ethereum
https://status.im
Mozilla Public License 2.0
719 stars 243 forks source link

chore(telemetry)_: add telemetry publish retry #5442

Open vpavlin opened 3 days ago

vpavlin commented 3 days ago

Latest change in telemetry client resulted in loss of messages if communication with Telemetry server failed. This PR presents one option to fix it - a new attribute is introduced serving as a cache which is kept in memory in case the communication fails and new telemetry messages are appended to this cache before retrying the communication.

A simple back-off mechanism is also added on retries - it might make sense to switch to exponential back-off and not cap it at 60s, consider this a draft or proposal open for comments/feedback:)

Important changes:

status-im-auto commented 3 days ago

Jenkins Builds

Click to see older builds (4) | :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result | |-|-|-|-|-|-|-| | :heavy_multiplication_x: | 0740a367 | [#1](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5442/1/) | 2024-06-28 12:21:10 | ~2 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5442/1//consoleText) | | :heavy_check_mark: | 0740a367 | [#1](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5442/1/) | 2024-06-28 12:22:36 | ~3 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240628-121840-0740a3-pr5442.zip) | | :heavy_check_mark: | 0740a367 | [#1](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5442/1/) | 2024-06-28 12:22:49 | ~4 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240628-121840-0740a3-pr5442.zip) | | :heavy_check_mark: | 0740a367 | [#1](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5442/1/) | 2024-06-28 12:24:12 | ~5 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240628-121840-0740a3-pr5442.aar) |
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: 9ed613fd #2 2024-06-28 19:45:33 ~2 min linux :package:zip
:heavy_check_mark: 9ed613fd #2 2024-06-28 19:46:05 ~2 min ios :package:zip
:heavy_check_mark: 9ed613fd #2 2024-06-28 19:48:34 ~5 min android :package:aar
:heavy_multiplication_x: 9ed613fd #2 2024-06-28 19:51:00 ~7 min tests :page_facing_up:log
:heavy_check_mark: 9ed613fd #3 2024-06-28 20:37:45 ~40 min tests :page_facing_up:log
:heavy_check_mark: d10e5c0a #3 2024-06-28 23:51:05 ~2 min android :package:aar
:heavy_check_mark: d10e5c0a #3 2024-06-28 23:51:15 ~2 min linux :package:zip
:heavy_check_mark: d10e5c0a #3 2024-06-28 23:51:49 ~2 min ios :package:zip
:heavy_check_mark: d10e5c0a #4 2024-06-29 00:31:24 ~42 min tests :page_facing_up:log