Monitoring

Catch errors, monitor performance, and get alerted when things break. Integrates with your existing error tracking service through a consistent API.

errorsapmalertingperformance

Providers

Sentry

Open-source error tracking with performance monitoring and session replay

@sentry/node
SENTRY_DSN

Datadog

Full-stack observability with APM, logs, and infrastructure monitoring

dd-trace
DD_API_KEYDD_APP_KEY

New Relic

Full-stack observability with AI-powered error analysis

newrelic
NEW_RELIC_LICENSE_KEY

Usage

Capture errors

Report errors with context to your monitoring provider

import { monitor } from '@/lib/monitor'

try {
  await processPayment(order)
} catch (error) {
  monitor.captureException(error, {
    tags: { orderId: order.id },
    user: { id: userId },
  })
}

Get Started

Add monitoring to your Primstack project with a single command:

prim monitor init