javascript
javascript copied to clipboard
feat(shared): Introduce client-side caching for telemetry events
Description
Currently blocking SDK-1672 (https://github.com/clerk/javascript/pull/3257)
Introduces client-side caching for telemetry events. This prevents event flooding in frequently executed code paths, such as for React hooks or components.
TODO:
- [ ] Manual tests on running applications
Checklist
- [X]
npm test
runs as expected. - [X]
npm run build
runs as expected. - [ ] (If applicable) JSDoc comments have been added or updated for any package exports
- [ ] (If applicable) Documentation has been updated
Type of change
- [ ] 🐛 Bug fix
- [X] 🌟 New feature
- [ ] 🔨 Breaking change
- [ ] 📖 Refactoring / dependency upgrade / documentation
- [ ] other:
🦋 Changeset detected
Latest commit: 43d94bc373bb8fffe2ad91106eae6c724ad15c60
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 11 packages
Name | Type |
---|---|
@clerk/shared | Patch |
@clerk/backend | Patch |
@clerk/chrome-extension | Patch |
@clerk/clerk-js | Patch |
@clerk/clerk-expo | Patch |
@clerk/fastify | Patch |
@clerk/nextjs | Patch |
@clerk/clerk-react | Patch |
@clerk/remix | Patch |
@clerk/clerk-sdk-node | Patch |
gatsby-plugin-clerk | Patch |
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
This PR also enables #3279 (adding telemetry to clerk-elements)
Here's is how the cache is going to look like from the local storage - a map between unit event keys and their TTL in milliseconds:
Re-opening it on https://github.com/clerk/javascript/pull/3287, this branch is from a forked repo so I think this is the cause of not allowing to run integration tests.