feat: add telemetry tracking via auth0-client header#301
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #301 +/- ##
==========================================
+ Coverage 89.47% 89.60% +0.13%
==========================================
Files 156 160 +4
Lines 13070 13240 +170
Branches 1419 1357 -62
==========================================
+ Hits 11694 11864 +170
Misses 1376 1376 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
do we have to support opt out option for customers with strict data policies ? |
| * @internal | ||
| */ | ||
| function DomainTable(props: DomainTableProps) { | ||
| useTelemetry('domain-management'); |
There was a problem hiding this comment.
should this be inside data layer in service hook ?
There was a problem hiding this comment.
service layer would not be an ideal choice to register the component here , because that can be used within multiple public hooks
| /** | ||
| * The package name used in telemetry. | ||
| */ | ||
| export const TELEMETRY_NAME = 'universal-components'; |
There was a problem hiding this comment.
why not package name itself ?
Good callout yes we should have, added now!! |

Summary
Adds telemetry tracking to API calls via the
Auth0-Clientheader. Block components declare their identity usinguseTelemetry()hook, enabling accurate tracking of which component initiated each API request.Why
To track usage and understand which UI components are making API calls for analytics and debugging purposes.
What
Core Package (
packages/core):TelemetryComponentGettertype andbuildTelemetryHeader()function intelemetry.tscreateProxyFetcher()andcreateSpaFetcher()to include telemetry headergetComponentparameter threading throughcreateCoreClient(),createMyAccountClient(),createMyOrganizationClient()React Package (
packages/react):TelemetryProvideranduseTelemetry()hookcss-detection.ts)spa-provider.tsxandproxy-provider.tsxuseTelemetry()to 6 block componentsPackages
packages/corepackages/reactexamplesTesting
Checklist
Contributing