Refactor: Remove Cronitor RUM tracking

This commit is contained in:
gpt-engineer-app[bot]
2025-11-05 15:59:05 +00:00
parent 1f93e7433b
commit 6e1ff944c8
6 changed files with 56 additions and 184 deletions

View File

@@ -58,18 +58,6 @@ export const breadcrumb = {
level: 'info',
data,
});
// Track critical user actions in Cronitor
const criticalActions = ['submit', 'delete', 'update', 'create', 'login', 'logout'];
const isCritical = criticalActions.some(ca => action.toLowerCase().includes(ca));
if (isCritical && typeof window !== 'undefined' && window.cronitor) {
window.cronitor.track('critical_user_action', {
action,
component,
timestamp: new Date().toISOString(),
});
}
},
apiCall: (endpoint: string, method: string, status?: number) => {
@@ -81,19 +69,6 @@ export const breadcrumb = {
level: isError ? 'error' : 'info',
data: { endpoint, method, status },
});
// Track significant API calls in Cronitor
if (typeof window !== 'undefined' && window.cronitor) {
// Only track errors and slow requests
if (isError || (status && status >= 500)) {
window.cronitor.track('api_error', {
endpoint,
method,
status,
severity: status >= 500 ? 'high' : 'medium',
});
}
}
},
stateChange: (description: string, data?: Record<string, any>) => {