forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtelemetry.ts
More file actions
48 lines (45 loc) · 744 Bytes
/
Copy pathtelemetry.ts
File metadata and controls
48 lines (45 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { InstanceType } from 'instance';
/**
* @internal
*/
export type TelemetryEvent = {
event: string;
/**
* publishableKey
*/
pk?: string;
/**
* secretKey
*/
sk?: string;
/**
* instanceType
*/
it: InstanceType;
/**
* clerkVersion
*/
cv: string;
/**
* SDK
*/
sdk?: string;
/**
* SDK Version
*/
sdkv?: string;
payload: Record<string, string | number | boolean>;
};
/**
* @internal
*/
export type TelemetryEventRaw<Payload = TelemetryEvent['payload']> = {
event: TelemetryEvent['event'];
eventSamplingRate?: number;
payload: Payload;
};
export interface TelemetryCollector {
isEnabled: boolean;
isDebug: boolean;
record(event: TelemetryEventRaw): void;
}