Sentry JavaScript (@sentry/browser)

The official Sentry SDK for capturing errors, performance traces, and session replays in browser JavaScript apps.

SDK
npm
v11.0.0
8,745 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
95 /100 Excellent
Development Activity 100
Maintenance 96
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 88
Code Quality 90
Innovation 85
Learning Curve 82

@sentry/browser is the flagship client-side SDK from the Sentry JavaScript monorepo, giving vanilla JS and framework-agnostic browser apps a single Sentry.init() call to unlock error monitoring, distributed tracing, session replay, and user feedback collection. It is the foundation that framework-specific SDKs (React, Vue, Angular, Svelte, Astro, and more) build on top of, so adopting it directly gives teams the same instrumentation core used across the entire Sentry JavaScript ecosystem.

Beyond basic exception capture, the SDK ships default integrations for global error handlers, breadcrumbs, HTTP context, and dedupe, plus opt-in integrations for browser tracing (Core Web Vitals, navigation/pageload spans), session replay, canvas replay, and both sync and async feedback widgets. Everything is tree-shakeable and side-effect free, so bundlers only pull in the pieces an app actually imports.

What You Get

  • Automatic global error and unhandled-promise-rejection capture via globalHandlersIntegration
  • Browser performance tracing with Core Web Vitals, pageload and navigation spans via browserTracingIntegration
  • Session Replay and canvas replay integrations for visual reproduction of user sessions
  • Synchronous and asynchronous in-app user feedback widgets (feedbackSyncIntegration / feedbackAsyncIntegration)
  • Breadcrumb trails, HTTP/console context, and automatic dedupe of repeated errors out of the box
  • A pluggable integration system (httpClientIntegration, contextLinesIntegration, graphqlClientIntegration, etc.) for extending what gets captured

Common Use Cases

  • Monitoring production JavaScript errors and stack traces for a single-page app or static site
  • Tracking Core Web Vitals and route-level performance regressions across page loads and client-side navigations
  • Recording session replays to visually reproduce a user-reported bug
  • Collecting structured in-app user feedback tied directly to a captured error or session

Under The Hood

Architecture: @sentry/browser is a thin browser-specific layer over @sentry/core: sdk.ts assembles a default integration list (inboundFilters, functionToString, browserApiErrors, breadcrumbs, globalHandlers, linkedErrors, dedupe, httpContext, cultureContext, browserSession) and calls core’s initAndBind with a BrowserClient (client.ts) that wires in eventFromException/eventFromMessage (eventbuilder.ts) and a fetch-based transport (transports/fetch.ts). Optional capabilities — tracing (tracing/browserTracingIntegration.ts), replay, replay-canvas, and feedback (feedbackSync.ts/feedbackAsync.ts) — are separate sibling packages re-exported from index.ts, so the dependency graph stays a star around @sentry/core rather than a tangle.

Tech Stack: 100% TypeScript, built with Rollup (rollup.npm.config.mjs for the tree-shakeable npm build, rollup.bundle.config.mjs for CDN bundles) and typed via a dedicated tsconfig.types.json plus downlevel-dts for TS 3.8 compatibility. Runtime dependencies are all first-party Sentry packages (@sentry/core, @sentry/browser-utils, @sentry/feedback, @sentry/replay, @sentry/replay-canvas, @sentry/conventions), keeping the external dependency surface at zero.

Code Quality: The package ships 50+ dedicated *.test.ts files under test/ (index bundling variants, eventbuilder, userfeedback, tracing) run via Vitest, plus madge --circular to guard against circular imports and oxlint --type-aware for type-aware linting. Public functions carry JSDoc with @example blocks, and internal helpers use exhaustive TypeScript types imported from @sentry/core rather than any.

API Design: The package favors a flat, function-based public API (captureException, addBreadcrumb, setUser, startSpan) over a class hierarchy, so getting started is a single Sentry.init({ dsn }) call plus direct function imports — no client instance to thread through the app. Every optional capability (tracing, replay, feedback) is its own named integration/export, letting consumers opt in without pulling unused code into their bundle (sideEffects: false), a deliberate ergonomics/bundle-size trade-off applied consistently across the whole @sentry/* family.

Used by 219 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

166

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
31
Repo Health
70
Technical
64
Dependency
Built with
TypeScript 76%
MDX 18%
Updated 1 years ago
TypeScript
100%
Other

Activepieces

AI Assistants · Automation · Mcp

24,756

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript 100%
Updated 5 days ago
TypeScript
100%
Other

Activepieces

AI Assistants · Automation · Mcp

24,756

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript 100%
Updated 5 days ago
TypeScript
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 6 days ago
Go
59%
Apache 2.0

agent-orchestrator

AI Agents · AI Code Assistants · Developer Tools

12,440

A local desktop workspace that gives every coding task its own agent, Git branch, and worktree, then tracks tasks, pull requests, CI, and reviews for 27 coding agents on one live Kanban board.

View details
86
Repo Health
83
Technical
68
Dependency
Built with
Go 59%
TypeScript 38%
Updated 5 days ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers