-
Notifications
You must be signed in to change notification settings - Fork 206
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(clerk-react,shared): Add telemetry events for React hooks #3341
Conversation
馃 Changeset detectedLatest commit: e24fbfb The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
86126eb
to
03dbfa5
Compare
@@ -24,6 +26,10 @@ export const useSignIn: UseSignIn = () => { | |||
const isomorphicClerk = useIsomorphicClerkContext(); | |||
const client = useClientContext(); | |||
|
|||
useEffect(() => { | |||
isomorphicClerk.telemetry?.record(eventMethodCalled('useSignIn')); |
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.
Hooks aren't necessary methods per se. However, I don't see the benefits of creating another event type for it, cause it wouldn't change much in terms of querying that data.
Anyway, open for feedback here!
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.
Maybe in the future we can have eventHookCalled
where we track the params passed to those hooks, useful for useOrganization and useOrganizationList, but i'm happy with this for now
e41aaad
to
e24fbfb
Compare
Description
Resolves SDK-1672
Add telemetry events for
useSignIn
,useSignUp
,useOrganizations
anduseOrganizationList
. This will allow us to track the usage of hooks for custom flows.Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change