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

feat: track intercepted URL count (app usage) #1127

Open
2 of 3 tasks
whizzzkid opened this issue Jan 6, 2023 · 4 comments
Open
2 of 3 tasks

feat: track intercepted URL count (app usage) #1127

whizzzkid opened this issue Jan 6, 2023 · 4 comments
Assignees
Labels
area/MV3 Issues related to Manifest V3 version effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful kind/enhancement A net-new feature or improvement to an existing feature need/maintainer-input Needs input from the current maintainer(s) need/maintainers-input Needs input from the current maintainer(s) P1 High: Likely tackled by core team if no one steps up

Comments

@whizzzkid
Copy link
Contributor

whizzzkid commented Jan 6, 2023

Blocked By: ipfs-shipyard/ignite-metrics#103

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

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).
  • 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
@whizzzkid whizzzkid added the need/triage Needs initial labeling and prioritization label Jan 6, 2023
@whizzzkid whizzzkid self-assigned this Jan 6, 2023
@whizzzkid whizzzkid added kind/enhancement A net-new feature or improvement to an existing feature exp/intermediate Prior experience is likely helpful P1 High: Likely tackled by core team if no one steps up need/maintainers-input Needs input from the current maintainer(s) effort/days Estimated to take multiple days, but less than a week need/maintainer-input Needs input from the current maintainer(s) and removed need/triage Needs initial labeling and prioritization labels Jan 6, 2023
@lidel lidel changed the title Ipfs-Companion Metrics IPFS Companion Metrics Jan 11, 2023
@lidel
Copy link
Member

lidel commented Jan 11, 2023

Dropping some other feature usage metrics that would be very valuable:

  • more resolution around IPFS page load success/failure rate
    • count root document loads vs subresource loads (a single page can have hundreds of subresources)
    • count the type of content path: immutable /ipfs/cid vs mutable cryptographic /ipns/libp2p-key vs mutable DNSLink /ipns/dnslink-name
  • count how many times user clicked on browser-action menu items or context menu on a page
    (will inform us which type of addres is copied the most, is import to MFS used at all etc)

@lidel lidel changed the title IPFS Companion Metrics IPFS Companion Metrics / Feature Usage Telemetry Jan 11, 2023
@whizzzkid whizzzkid assigned SgtPooki and unassigned whizzzkid Feb 3, 2023
@BigLep
Copy link
Contributor

BigLep commented Feb 10, 2023

Before we write code here, I want to make sure we have clearly defined the metrics we're going to collect and report. I'ld like to review this please when it's ready so save potential churn later.

@SgtPooki SgtPooki changed the title IPFS Companion Metrics / Feature Usage Telemetry feat: track intercepted URL count (app usage) Feb 10, 2023
@SgtPooki
Copy link
Member

  • what is the avg number of intercepted urls for users who have intercepted IPFS urls
  • How many web requests are ipfs urls?

@whizzzkid
Copy link
Contributor Author

MV3 does not allow this. this was possible in mv2, but mv3 does not want extensions to be touching the requests, just tell the browser what needs to happen and it will do that for you.

I have an issue open with chrome team asking for the stats api, but I don’t think that’s going to happen: https://bugs.chromium.org/p/chromium/issues/detail?id=1429170

In the meantime, we can probably append utm_* params to redirect url, which provides the source as the redirection rule id. Then cross check if the observed request is being redirected because of the rule the extension added. This may lead to reliable detection of redirected requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/MV3 Issues related to Manifest V3 version effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful kind/enhancement A net-new feature or improvement to an existing feature need/maintainer-input Needs input from the current maintainer(s) need/maintainers-input Needs input from the current maintainer(s) P1 High: Likely tackled by core team if no one steps up
Projects
No open projects
Status: Prioritized / Ready for Dev
Development

No branches or pull requests

4 participants