DEV Community

Alex Spinov
Alex Spinov

Posted on

Sentry Has a Free Error Tracking Platform — Find and Fix Bugs Before Your Users Report Them

Why Sentry?

Sentry captures errors with full stack traces, source maps, breadcrumbs, and context — so you fix bugs before users complain.

Quick Start

npm install @sentry/node
Enter fullscreen mode Exit fullscreen mode
import * as Sentry from '@sentry/node'

Sentry.init({ dsn: 'https://your-dsn@sentry.io/123', tracesSampleRate: 0.1 })

// Errors are captured automatically
try {
  riskyOperation()
} catch (error) {
  Sentry.captureException(error)
}
Enter fullscreen mode Exit fullscreen mode

React

import * as Sentry from '@sentry/react'

Sentry.init({ dsn: 'https://your-dsn@sentry.io/123' })

function App() {
  return (
    <Sentry.ErrorBoundary fallback={<p>Something went wrong</p>}>
      <MyApp />
    </Sentry.ErrorBoundary>
  )
}
Enter fullscreen mode Exit fullscreen mode

Performance Monitoring

const transaction = Sentry.startTransaction({ name: 'process-order' })
const span = transaction.startChild({ op: 'db.query' })
await db.query('SELECT * FROM orders')
span.finish()
transaction.finish()
Enter fullscreen mode Exit fullscreen mode

Breadcrumbs (What Happened Before the Error)

Sentry auto-captures:

  • Console logs
  • HTTP requests
  • UI clicks
  • Navigation
  • State changes

Source Maps

npx @sentry/wizard@latest -i sourcemaps
npm run build  # Uploads source maps automatically
Enter fullscreen mode Exit fullscreen mode

Sentry shows the ORIGINAL TypeScript code in error reports, not minified JS.

Need to extract data from any website at scale? I build custom web scrapers — 77 production scrapers running on Apify Store. Email me at spinov001@gmail.com for a tailored solution.

Top comments (0)