-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Add metrics for provider calls coming from ppom on mobile #7419
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7419 +/- ##
==========================================
+ Coverage 34.61% 34.64% +0.02%
==========================================
Files 1017 1017
Lines 27162 27168 +6
Branches 2211 2212 +1
==========================================
+ Hits 9402 9411 +9
+ Misses 17273 17267 -6
- Partials 487 490 +3
☔ View full report in Codecov by Sentry. |
b1fd5be
to
85aa789
Compare
85aa789
to
346d8d8
Compare
Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> lint fixes Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> use preferences controller Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> Remove array props Use CSV instead of list Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> use the list without spreading. Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> use strings to store security providers key lint fix. Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> Add metrics for blockaid provider calls count. track all methods tests for blockaid utils Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
346d8d8
to
ef3efb7
Compare
Kudos, SonarCloud Quality Gate passed! |
I think we would need to test this in mobile after PR: https://github.com/MetaMask/metamask-mobile/pulls/jpuri is merged. |
Description
We need to add metrics to help measure and estimate the usage and cost of Infura by ppom.
This fix uses the
providerRequestsCount
object returned as part of the securityAlertResponse of transaction object and gets only the keys that matches the below specified requests.Proposal
Add new properties to Transactions and Signature events where which property will count the number of rpc requests made by ppom to evaluate that specific transaction or signature.
ppom_eth_call_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureppom_eth_createAccessList_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureppom_eth_getStorageAt_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureppom_eth_getCode_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureppom_eth_getTrasanctionCount_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureppom_eth_getBalance_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureppom_trace_call_count
- counts the number of eth_call rpc requests made by ppom to evaluate that transaction or signatureReferences
Related issues
_Fixes #1357
Testing
Pre-merge author checklist
Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/855ec13d-b519-46d5-b3d6-f0067fe9fd57
Pre-merge reviewer checklist