chore(clerk-react): Send telemetry events for React hooks#3257
chore(clerk-react): Send telemetry events for React hooks#3257LauraBeatris wants to merge 1 commit intoclerk:mainfrom LauraBeatris:send-telemetry-events-react-hooks
Conversation
🦋 Changeset detectedLatest commit: 6dbb515 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| [orgId, orgRole, userId, orgPermissions], | ||
| ); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
We need to be careful that those events will be emitted on the React tree render. Especially during local development, this could be dispatched in a huge volume due to hot reloads.
I'm considering passing a sampling rate to decrease the fraction of all events that should be recorded. We already do so for COMPONENT_MOUNTED.
|
We should not emit events for all hooks. We need to consider what particular insights each hook would give us, and whether it's useful. I advocate for sending events from Edit: @panteliselef also mentioned that tracking organizations might be useful to have a sense for custom organization flows. |
|
Blocking this PR as I'm still deciding on how to move forward with recordings events in code hot-paths. Edit: We're going to move forward with introducing client-side caching. I'll open another PR for this. |
|
Also closing this one in order to open later directly from the repo instead of a forked branch. |
Description
Resolves SDK-1672
Sends telemetry events for React hooks. This will be useful to track regarding the creation of custom flows with hooks such as
useSignUp.Checklist
npm testruns as expected.npm run buildruns as expected.Type of change