Monitoring in MakerKit

How monitoring works in this codebase.

This repo ships a small monitoring abstraction with built-in Sentry support and a console fallback.

What Exists

  • Provider selection in packages/monitoring/api/src/get-monitoring-provider.ts
  • Client provider wrapper in packages/monitoring/api/src/components/provider.tsx
  • Server accessor in packages/monitoring/api/src/server.ts
  • Shared contract in packages/monitoring/core/src/monitoring.service.ts
  • Console fallback in packages/monitoring/core/src/console-monitoring.service.ts
  • Sentry implementation in packages/monitoring/sentry

Supported Providers

Current runtime support:

  • sentry
  • empty value for console fallback

The docs for PostHog, Honeybadger, and SigNoz are informational only: those providers are not built into the repo.

Client Usage

Use the client hooks from @kit/monitoring/hooks:

  • useMonitoring()
  • useCaptureException(error)

Server Usage

Use getServerMonitoringService() from @kit/monitoring/server to capture exceptions or custom events from server code.

Enable Sentry

Set:

NEXT_PUBLIC_MONITORING_PROVIDER=sentry
NEXT_PUBLIC_SENTRY_DSN=https://your-dsn@sentry.io/project-id

For the Sentry-specific setup in this repo, see Sentry.