ipfs / ipfs/ipfs-companion

feat: track intercepted URL count (app usage)

Open
#1,127 4 comments 0 reactions 1 assignee Assigned to @SgtPooki View on GitHub
area/MV3 effort/days exp/intermediate kind/enhancement need/maintainer-input need/maintainers-input P1
Dominant language
JavaScript
Stars
2.2k
Forks
338
Avg merge
3m
Merged PRs (30d)
1

Description

Blocked By: https://github.com/ipfs-shipyard/ignite-metrics/issues/103

Using https://github.com/ipfs-shipyard/ignite-metrics like in #1117 implement:

- [x] Track DAU - Daily Active Users (i.e. intercepted URLs > 0)
- [x] Track number of URLs actually resolved by companion, i.e. success rate.
- [ ] Track number of URLs resolved over the public gateway (based on #1125)

Additional Notes:
- To implement number of URLs resolved by companion, we'll need to implement some sort of local storage mechanism because reporting each url resolved and not resolved could be (anecdotally) 10+ requests/second/user which would be a lot. Since we intercept every request and resolve URLs that can be identified resolvable using the local node.
- A simple approach could be to maintain a local counter to be incremented and flush the count every N-hours (using the [alarms API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms)).
- Once the values are sent, we can reset the counter and start again.
- This metric will go down as MV3 comes into effect.
- We can store metrics locally and sync periodically within https://github.com/ipfs-shipyard/ignite-metrics

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.