feat: Integrate Cronitor RUM

This commit is contained in:
gpt-engineer-app[bot]
2025-11-05 15:07:31 +00:00
parent e1ffba593a
commit 0106bdb1d5
7 changed files with 160 additions and 16 deletions

23
src/types/cronitor.d.ts vendored Normal file
View File

@@ -0,0 +1,23 @@
declare module '@cronitorio/cronitor-rum' {
export interface CronitorConfig {
debug?: boolean;
trackMode?: 'history' | 'off';
}
export function load(apiKey: string, config?: CronitorConfig): void;
export function track(eventName: string, data?: Record<string, any>): void;
export function error(error: Error | string, metadata?: Record<string, any>): void;
}
declare global {
interface Window {
cronitor?: {
track: (eventName: string, data?: Record<string, any>) => void;
error: (error: Error | string, metadata?: Record<string, any>) => void;
};
}
}
export {};