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

telemetry: retry failed telemtry pushes #5431

Open vpavlin opened 4 days ago

vpavlin commented 4 days ago

Problem

After the PR https://github.com/status-im/status-go/pull/5399 is merged, in case telemetry server is unavailable and request failes, we'd lose the messages. For that we should come up with some back-off retry mechanism for caching and retrying the push

Implementation

I see 2 options - either pre-pend the messages back to the telemetryCache slice, or have another slice and goroutine to drop the telemetry messages to if they were not successfully published which would then be retried

Acceptance Criteria

Telemetry messages are not discarded if telemetry server is unreachable, but publishing is retried