Skip to main content
Sentry starts capturing errors as soon as you initialize the SDK with your project’s DSN. This guide walks you from sign-up to your first event in the dashboard.
1

Create a Sentry account

Go to sentry.io and sign up. You can use your email address, or sign in with Google or GitHub.During sign-up, you’ll create your organization — the top-level container for all your projects and team members. Choose a name for your company or team.
Sentry is free for small teams. The Developer plan includes one user and generous event limits to get started without a credit card.
2

Create a project

After signing in, create your first project:
  1. Go to Settings > Projects > Create Project
  2. Select your platform (JavaScript, Python, or any of the 100+ supported platforms)
  3. Give your project a name that matches your application or service
  4. Assign it to a team
Sentry displays your project’s DSN (Data Source Name) on the next screen. Copy it — you’ll need it in the next step.
You can always find your DSN later at Settings > Projects > [your project] > Client Keys (DSN).
3

Install the SDK

Install the Sentry SDK for your language using your package manager.
npm install --save @sentry/browser
For Node.js applications:
npm install --save @sentry/node
4

Initialize Sentry

Add the initialization code as early as possible in your application’s startup — before any other code runs.Replace YOUR_DSN with the DSN you copied when creating your project.
import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "https://<key>@<org>.ingest.sentry.io/<project>",

  // Set a sample rate: 1.0 captures 100% of transactions
  // Lower this in production if you have high traffic
  tracesSampleRate: 1.0,
});
The DSN format is https://<public_key>@<host>/<project_id>. Sentry generates this automatically — you don’t need to construct it manually.
5

Throw a test error

Verify the SDK is working by triggering a test exception.
// Add this button or call from your code to trigger a test error
document.getElementById("test-error").addEventListener("click", () => {
  throw new Error("Sentry test error");
});

// Or capture an exception manually
try {
  throw new Error("This is a test error");
} catch (error) {
  Sentry.captureException(error);
}
6

View your event in the dashboard

Go to your Sentry dashboard at sentry.io. Navigate to Issues in the left sidebar.Your test error should appear within a few seconds. Click it to see:
  • The full stack trace
  • Breadcrumbs leading up to the error
  • Environment and release information
  • Device and browser context (for frontend errors)
If your event doesn’t appear after 30 seconds, check that the DSN in your code matches exactly what’s shown in Settings > Projects > [your project] > Client Keys (DSN).

Next steps

Account Setup

Configure your organization, invite team members, and set up SSO.

Create a Project

Learn more about project settings, DSN keys, and environments.

SDK Reference

Explore advanced SDK configuration for your platform.

Alerts

Set up alert rules so you get notified when errors occur.