Throttle IPFS_INIT_FAILED events #1831
Labels
effort/hours
Estimated to take one or several hours
exp/novice
Someone with a little familiarity can pick up
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
released
Problem
When user opts-in to sending usage metrics, and ipfs-webui is not able to connect to HTTP API, it will send a new
IPFS_INIT_FAILED
event to Countly every few seconds when it tries to reconnect and fails again. This produces multiple events sent every minute:This behavior can be observed on https://webui.ipfs.io and inside of ipfs-desktop when a local node is shut down when webui is still open (need to opt-in to metrics first)
Additionally, on a slower machine ipfs-desktop shows ipfs-webui before go-ipfs is fully booted, but that triggers no more than one or two events.
Solution
We should be throttling how often
IPFS_INIT_FAILED
is sent.Some quick ideas:
IPFS_INIT_FAILED
state to remain for 10+ seconds.IPFS_INIT_FAILED
is confirmed by being real for over 10 seconds, we do not want to keep spamming events every few seconds.Tasks
The text was updated successfully, but these errors were encountered: