-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add (unstable) telemetry support with a hook #2368
Conversation
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.
Can we avoid 'monorail' in the naming - something more generic like "telemetry" feels a bit more agonostic so we can decouple us from using specific internal tooling
In the playground code, should |
@kaelig Check the props of AppProvider: |
|
Same feels from me for using a more generic term like |
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.
Thanks for updating the naming. A few little nitpicks, and one bigger thing about how to handle breaking the rule of hooks -that may require a deeper chat with kaelig to make sure he understands what the presence of those fields mean for our data logging
WHY are these changes introduced?
We want to gather data around icon usage, and test the concept of gathering data about component usage, before deciding if we want to expand this to other components.
This is a temporary change, so we will remove it in a few weeks, once we have gathered enough data. However, we want feedback on this approach for gathering usage data on Polaris components.
WHAT is this pull request doing?
This PR adds a prop to the
AppProvider
that is then accessed byIcon
(for now, but possibly any component in the future if this approach works) via a hook.Icon
then logs relevant information to monorail when it is rendered.In order to gather data, this PR will be accompanied by a PR in web that provides their monorail instance to
AppProvider
, and that we can then use inpolaris-react
to log usage.Adding
In order to clearly mark this as a temporary change, we marked all public-facing aspects of it "unstable" cc @tmlayton
How to 🎩
See the example code
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes