Skip to content
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

fix: dont spam IPFS_INIT_FAILED events to countly #2133

Merged
merged 9 commits into from
Jul 1, 2023

Conversation

SgtPooki
Copy link
Member

@SgtPooki SgtPooki commented Jun 30, 2023

WIP.

fixes #1831

  • Only send IPFS_INIT_FAILED event after 5 attempts
  • Only send the IPFS_INIT_FAILED event once per app-load
  • Stop the retry-init process after a certain number of attempts

Note: We can debounce these and send only 1 every 5 min or so, but we're in breach of our countly contract currently because IPFS_INIT_FAILED is currently sending 4.8MM of these events from IPFS Desktop and 2MM from IPFS Web UI.

We do not need this many events to know if things are failing. Knowing how many times IPFS_INIT_FAILED per app load will be a MUCH better metric for informing how successful the app is for our users.

This also means, when the app boots up, if the user changes the API endpoint, we won't send an additional IPFS_INIT_FAILED metric. If we want to get a metric for this, we'll have to do some logic around IPFS_API_ADDRESS_UPDATED, IPFS_API_ADDRESS_PENDING_FIRST_CONNECTION, and then the result of either IPFS_CONNECT_SUCCEED or IPFS_CONNECT_FAILED


demo

2023-06-29.at.18.08.02.-.Gray.Bear.mp4

@SgtPooki SgtPooki linked an issue Jun 30, 2023 that may be closed by this pull request
@SgtPooki SgtPooki changed the title fix: dont spam IPFS_INIT_FAILED events to countly [WIP] fix: dont spam IPFS_INIT_FAILED events to countly Jun 30, 2023
@SgtPooki SgtPooki temporarily deployed to Deploy June 30, 2023 00:55 — with GitHub Actions Inactive
@SgtPooki SgtPooki temporarily deployed to Deploy June 30, 2023 01:08 — with GitHub Actions Inactive
@SgtPooki SgtPooki changed the title [WIP] fix: dont spam IPFS_INIT_FAILED events to countly fix: dont spam IPFS_INIT_FAILED events to countly Jun 30, 2023
@SgtPooki SgtPooki marked this pull request as ready for review June 30, 2023 01:10
@SgtPooki SgtPooki requested a review from a team as a code owner June 30, 2023 01:10
@SgtPooki SgtPooki requested review from lidel and whizzzkid June 30, 2023 01:10
@SgtPooki SgtPooki temporarily deployed to Deploy June 30, 2023 01:17 — with GitHub Actions Inactive
@SgtPooki SgtPooki requested a review from vesahc June 30, 2023 01:34
@SgtPooki SgtPooki temporarily deployed to Deploy June 30, 2023 01:38 — with GitHub Actions Inactive
Copy link
Contributor

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits, lgtm.

src/lib/hofs/functions.js Show resolved Hide resolved
src/lib/hofs/functions.js Show resolved Hide resolved
src/lib/hofs/functions.js Show resolved Hide resolved
src/bundles/analytics.js Outdated Show resolved Hide resolved
src/bundles/analytics.js Outdated Show resolved Hide resolved
@SgtPooki SgtPooki temporarily deployed to Deploy June 30, 2023 18:16 — with GitHub Actions Inactive
@SgtPooki SgtPooki temporarily deployed to Deploy June 30, 2023 18:36 — with GitHub Actions Inactive
Copy link
Contributor

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SgtPooki SgtPooki merged commit b8cf74a into main Jul 1, 2023
@SgtPooki SgtPooki deleted the 1831-throttle-ipfs_init_failed-events branch July 1, 2023 01:35
ipfs-gui-bot pushed a commit that referenced this pull request Jul 3, 2023
## [4.0.2](v4.0.1...v4.0.2) (2023-07-03)

 CID `bafybeicyp7ssbnj3hdzehcibmapmpuc3atrsc4ch3q6acldfh4ojjdbcxe`

 ---

### Bug Fixes

* dont spam IPFS_INIT_FAILED events to countly ([#2133](#2133)) ([b8cf74a](b8cf74a))

### Trivial Changes

* **deps:** bump actions/checkout from 3.5.2 to 3.5.3 ([#2128](#2128)) ([de5aaf4](de5aaf4))
* **deps:** bump actions/download-artifact from 2 to 3 ([#2129](#2129)) ([5427709](5427709))
* **deps:** bump actions/github-script from 3 to 6 ([#2127](#2127)) ([d31f25c](d31f25c))
* **deps:** bump actions/upload-artifact from 2 to 3 ([#2126](#2126)) ([4b45b5f](4b45b5f))
* **deps:** bump gozala/typescript-error-reporter-action ([#2130](#2130)) ([3ea7f59](3ea7f59))
* **deps:** bump stefanzweifel/git-auto-commit-action ([#2125](#2125)) ([d76d95c](d76d95c))
* **readme:** remove mentions of js-ipfs ([#2134](#2134)) ([a43dd23](a43dd23))
* Update .github/dependabot.yml [skip ci] ([bea5f67](bea5f67))
* Update .github/workflows/stale.yml [skip ci] ([c5eaecc](c5eaecc))
* Update .github/workflows/stale.yml [skip ci] ([1fe83ec](1fe83ec))
@ipfs-gui-bot
Copy link
Collaborator

🎉 This PR is included in version 4.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throttle IPFS_INIT_FAILED events
3 participants