DEV Community

Alex Spinov
Alex Spinov

Posted on

Sentry Has a Free API That Catches Errors Before Your Users Report Them

Sentry catches errors in production, shows you the stack trace, the user's browser, the request that caused it, and which deploy introduced it.

Quick Start

npm install @sentry/node  # or @sentry/react, @sentry/nextjs
Enter fullscreen mode Exit fullscreen mode
import * as Sentry from '@sentry/node'

Sentry.init({
  dsn: 'https://your-dsn@sentry.io/123',
  tracesSampleRate: 0.1  // 10% of transactions
})
Enter fullscreen mode Exit fullscreen mode

That's it. Unhandled errors are now captured automatically.

What You See When an Error Occurs

  • Full stack trace with source maps
  • User info (browser, OS, IP)
  • Breadcrumbs (what happened before the error)
  • Release tracking (which deploy caused it)
  • Affected user count

Performance Monitoring

// Automatic for HTTP requests, DB queries
// Manual for custom operations:
const transaction = Sentry.startTransaction({ name: 'processOrder' })
// ... your code
transaction.finish()
Enter fullscreen mode Exit fullscreen mode

Free Tier

  • 5K errors/month
  • 10K transactions/month
  • 1 team member
  • 30-day retention

Sentry vs LogRocket vs Datadog

Feature Sentry LogRocket Datadog
Error tracking Best Good Good
Session replay Yes Best Yes
Performance Yes Limited Best
Free tier 5K errors 1K sessions 14-day trial

The Bottom Line

Sentry is the standard for error tracking. Set up in 2 minutes, know about errors before users complain.


Need to automate data collection or build custom scrapers? Check out my Apify actors for ready-made tools, or email spinov001@gmail.com for custom solutions.

Top comments (0)