Guide

JavaScript & React (browser)

1 min read

Browser apps use the standard Sentry browser SDKs against your jentry DSN: errors with source-mapped stack traces, performance (Web Vitals + transactions), and Session Replay.

Install and init

// npm i @sentry/react   (or @sentry/browser for vanilla JS)
import * as Sentry from '@sentry/react';

Sentry.init({
  dsn: 'https://<publicKey>@jentry.app/<projectId>',
  environment: import.meta.env.MODE,
  release: 'web-app@1.4.2', // match your source-map upload
  integrations: [
    Sentry.browserTracingIntegration(),
    Sentry.replayIntegration(), // Session Replay — recordings land in jentry
  ],
  tracesSampleRate: 0.1,
  replaysSessionSampleRate: 0.05,
  replaysOnErrorSampleRate: 1.0,
});

Session Replay works out of the box: the SDK's compressed (zlib) rrweb recordings are ingested from the standard envelope — no extra endpoint or config.

Web Vitals & performance

With browserTracingIntegration, page loads and navigations become transactions: LCP/CLS/INP/FCP/TTFB feed the Web Vitals panel, and each route gets p50/p95, throughput and Apdex under Performance.

Readable stack traces

Minified frames are de-minified server-side when you upload source maps for the release — see the Releases & source maps guide. Without maps, jentry still groups correctly; frames just show minified locations.

React error boundaries: wrap your tree in Sentry.ErrorBoundary (or call Sentry.captureException in your own boundary) so render crashes are captured with component stacks.

Alternative: the jentry SDK

If you prefer a first-party client, @jentry/sdk is on npm — a small, dependency-free isomorphic SDK (browser + Node) with errors, breadcrumbs, sessions and transactions. The Sentry SDKs remain fully supported; this is just a lighter option.

npm install @jentry/sdk
import * as Jentry from '@jentry/sdk';

Jentry.init({
  dsn: 'https://<key>@jentry.app/<project>',
  environment: 'production',
});

No bundler? A prebuilt browser bundle is served from your jentry host — include it with a plain script tag and use window.jentry:

<script src="https://jentry.app/sdk/jentry.min.js"></script>
<script>
  jentry.init({ dsn: 'https://<key>@jentry.app/<project>' });
</script>

Try jentry free

Hosted error tracking & performance monitoring. Works with your Sentry SDKs — send your first event in minutes.

jentry Docs — JavaScript / React setup