Implémentation complète de la stack d'observabilité pour le monitoring de la plateforme multi-tenant Classeo. ## Error Tracking (GlitchTip) - Intégration Sentry SDK avec GlitchTip auto-hébergé - Scrubber PII avant envoi (RGPD: emails, tokens JWT, NIR français) - Contexte enrichi: tenant_id, user_id, correlation_id - Configuration backend (sentry.yaml) et frontend (sentry.ts) ## Metrics (Prometheus) - Endpoint /metrics avec restriction IP en production - Métriques HTTP: requests_total, request_duration_seconds (histogramme) - Métriques sécurité: login_failures_total par tenant - Métriques santé: health_check_status (postgres, redis, rabbitmq) - Storage Redis pour persistance entre requêtes ## Logs (Loki) - Processors Monolog: CorrelationIdLogProcessor, PiiScrubberLogProcessor - Détection PII: emails, téléphones FR, tokens JWT, NIR français - Labels structurés: tenant_id, correlation_id, level ## Dashboards (Grafana) - Dashboard principal: latence P50/P95/P99, error rate, RPS - Dashboard par tenant: métriques isolées par sous-domaine - Dashboard infrastructure: santé postgres/redis/rabbitmq - Datasources avec UIDs fixes pour portabilité ## Alertes (Alertmanager) - HighApiLatencyP95/P99: SLA monitoring (200ms/500ms) - HighErrorRate: error rate > 1% pendant 2 min - ExcessiveLoginFailures: détection brute force - ApplicationUnhealthy: health check failures ## Infrastructure - InfrastructureHealthChecker: service partagé (DRY) - HealthCheckController: endpoint /health pour load balancers - Pre-push hook: make ci && make e2e avant push
60 lines
1.8 KiB
JSON
60 lines
1.8 KiB
JSON
{
|
|
"name": "classeo-frontend",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:e2e": "playwright test",
|
|
"lint": "eslint .",
|
|
"format": "prettier --write ."
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.0.0",
|
|
"@playwright/test": "^1.50.0",
|
|
"@sveltejs/adapter-auto": "^4.0.0",
|
|
"@sveltejs/adapter-node": "^5.0.0",
|
|
"@sveltejs/kit": "^2.50.0",
|
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
"@tailwindcss/forms": "^0.5.7",
|
|
"@tailwindcss/typography": "^0.5.10",
|
|
"@testing-library/svelte": "^5.2.0",
|
|
"@types/node": "^22.0.0",
|
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
"@typescript-eslint/parser": "^8.0.0",
|
|
"@vitest/coverage-v8": "^2.1.0",
|
|
"autoprefixer": "^10.4.20",
|
|
"eslint": "^9.0.0",
|
|
"eslint-config-prettier": "^10.0.0",
|
|
"eslint-plugin-svelte": "^3.0.0",
|
|
"svelte-eslint-parser": "^1.0.0",
|
|
"jsdom": "^27.4.0",
|
|
"postcss": "^8.4.47",
|
|
"prettier": "^3.4.0",
|
|
"prettier-plugin-svelte": "^3.3.0",
|
|
"prettier-plugin-tailwindcss": "^0.6.0",
|
|
"svelte": "^5.15.0",
|
|
"svelte-check": "^4.1.0",
|
|
"tailwindcss": "^3.4.16",
|
|
"typescript": "^5.7.0",
|
|
"typescript-eslint": "^8.54.0",
|
|
"vite": "^6.0.0",
|
|
"vitest": "^2.1.0"
|
|
},
|
|
"dependencies": {
|
|
"@sentry/sveltekit": "^8.50.0",
|
|
"@tanstack/svelte-query": "^5.66.0",
|
|
"@vite-pwa/sveltekit": "^0.6.8",
|
|
"web-vitals": "^4.2.0",
|
|
"workbox-window": "^7.3.0"
|
|
},
|
|
"packageManager": "pnpm@10.28.2"
|
|
}
|