-
-
Notifications
You must be signed in to change notification settings - Fork 213
feat: Add New Analytics Client #1270
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
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
ecp4224
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM with 1 question
packages/sdk-analytics/src/index.ts
Outdated
| @@ -0,0 +1,7 @@ | |||
| import Analytics from './analytics'; | |||
|
|
|||
| const client = new Analytics('https://mm-sdk-analytics.api.cx.metamask.io/'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be configurable via SDK options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, good point. At the same time this is going to be bundled inside other SDKS and only one who would benefit from having this would be ourselves, but at the same time we should be able to isolate and test anything without exposing that
2a4c28f to
2c48efd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1270 +/- ##
=======================================
Coverage 74.05% 74.05%
=======================================
Files 182 182
Lines 4352 4352
Branches 1066 1066
=======================================
Hits 3223 3223
Misses 1129 1129 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@SocketSecurity ignore-all |
|
christopherferreira9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM



Explanation
This PR introduces the
@metamask/sdk-analyticspackage, a standalone analytics client for tracking usage events with batching, error handling, and OpenAPI schema validation. It lays the foundation for decoupling analytics from the relay server, by separating the client and making use of the new server as well. Integration with SDK and wallet to follow in later PRs.References
Checklist