Sentry JavaScript SDK
Official Sentry JavaScript SDK for error tracking, performance monitoring, and session replay. Covers all JavaScript environments: browser (vanilla, React, Vue, Angular, Svelte), Node.js, Next.js, Remix, SvelteKit, Deno, Bun, and edge runtimes. Captures unhandled exceptions, records transactions/spans for performance tracing, and provides session replay for visual debugging. The @sentry/node package handles server-side Node.js including Express, Fastify, and NestJS.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
HTTPS enforced. DSN is safe to expose publicly (receive-only). Auth tokens for REST API have granular scopes. EU data residency available for GDPR compliance. PII scrubbing configurable via beforeSend.
⚡ Reliability
Best When
You're building JavaScript/TypeScript applications and need error tracking with stack traces, performance monitoring, and optionally session replay to debug production issues.
Avoid When
You need comprehensive infrastructure monitoring, log aggregation, or complex alerting rules — Sentry focuses on application-layer errors and performance.
Use Cases
- • Capture and alert on unhandled JavaScript errors in production browser and Node.js applications with full stack traces
- • Trace API request performance end-to-end (frontend → backend → database) using Sentry's distributed tracing
- • Replay user sessions when bugs occur to visually see what the user did before the error with Sentry Session Replay
- • Monitor Next.js, Remix, or SvelteKit application performance — Sentry has framework-specific integrations for server components and edge routes
- • Set up custom error boundaries and context enrichment (user, tags, extras) to improve error debuggability in React apps
Not For
- • Infrastructure/server metrics monitoring — use Datadog, Prometheus, or Grafana for infrastructure metrics
- • Log aggregation — Sentry captures errors and traces, not raw logs; use Loki or CloudWatch Logs for log pipelines
- • Uptime/synthetic monitoring — Sentry Crons is limited; use Checkly or Better Uptime for comprehensive synthetic monitoring
Interface
Authentication
SDK uses DSN (Data Source Name) for event ingestion — public key embedded in frontend code. REST API uses auth tokens with fine-grained scopes (project:read, event:write, etc.). DSN is not a secret for client-side use.
Pricing
Free tier is limited but useful for small projects and development. Team tier adds alert rules and integrations. Can self-host for unlimited volume using open source Sentry.
Agent Metadata
Known Gotchas
- ⚠ SDK v8 has breaking changes from v7 — init() configuration moved to platform-specific packages; agents upgrading must follow the v7→v8 migration guide carefully
- ⚠ Source maps must be uploaded to Sentry for meaningful stack traces in minified production JavaScript — without them stack traces show minified variable names
- ⚠ Sentry.init() must be called before any other imports in Node.js for full instrumentation — in Next.js this requires instrumentation.ts entry point
- ⚠ PII filtering: Sentry captures request/response bodies and user data by default — configure beforeSend to scrub sensitive fields before events leave the browser/server
- ⚠ Performance sampling (tracesSampleRate) should be < 1.0 in high-traffic production — default of 1.0 captures every transaction and can hit quota limits quickly
- ⚠ Tunnel middleware needed to avoid ad-blocker interference in browser apps — ad blockers block requests to sentry.io; use Sentry's tunnel feature to proxy through your own domain
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Sentry JavaScript SDK.
Scores are editorial opinions as of 2026-03-06.