Creating a Custom Monitoring Provider
Extend the monitoring abstraction with your own provider.
If you need a provider other than Sentry, add it through the monitoring abstraction.
Steps
- Implement
MonitoringService - Register the provider in
packages/monitoring/api/src/get-monitoring-provider.ts - Register the client provider in
packages/monitoring/api/src/components/provider.tsx - Register the server service in
packages/monitoring/api/src/services/get-server-monitoring-service.ts
Core Types
Use these files as the source of truth:
packages/monitoring/core/src/monitoring.service.tspackages/monitoring/core/src/monitoring.context.tspackages/monitoring/api/src/get-monitoring-provider.ts
Important Constraint
The provider name must be added to the MONITORING_PROVIDERS enum. Without that change, NEXT_PUBLIC_MONITORING_PROVIDER will be treated as invalid and the app will fall back to the console service.