snaps icon indicating copy to clipboard operation
snaps copied to clipboard

Move Snap export metrics to SnapController

Open FrederikBolding opened this issue 10 months ago • 1 comments

Right now we collect metrics about Snap export usage directly in the clients, but this means we are missing out on all calls that go directly between controllers. We should move the metrics to the controller itself.

Additionally, we should audit what specific exports we want to track since we've added a bunch since we implemented metrics.

FrederikBolding avatar Mar 26 '25 10:03 FrederikBolding

From Christian:

Exports should be:

  • onHomePage
  • onInstall
  • onNameLookup
  • onRpcRequest
  • onSignature
  • onTransaction
  • onUpdate

Others do not make sense to track as they do not involve the user viewing / interacting with a page or dialog (and onUserInput would generate a lot of data that wouldn’t be useful either). And definitely debounce onNameLookup, we don’t need to collect every instance

ajeetd avatar Mar 27 '25 16:03 ajeetd

Done and fully integrated with following release PRs: https://github.com/MetaMask/metamask-extension/pull/32744 https://github.com/MetaMask/metamask-mobile/pull/15232

david0xd avatar May 14 '25 09:05 david0xd