Sentry catches errors and collects performance data so you can fix bugs before users report them.
Quick Setup
To enable Sentry in your project, you only need two things:
- Set
isSentryEnabled: true in global.config.ts
- Add the DSN to your
.env.local file:
VITE_SENTRY_DSN=https://[email protected]/xxxxx
Step 1 — Create a Sentry project
- Go to sentry.io and create an account (or log in)
- Click Create Project
- Choose Browser as the platform, then select JavaScript (not React — the plugin runs in an iframe, not a standard SPA)
- Give your project a name (e.g. "my-figma-plugin")
- Once created, Sentry shows you a DSN (Data Source Name) — it looks like
https://[email protected]/789
- You can also find it later in Settings → Client Keys (DSN)
- Paste it into your
.env.local file (see above)
Optionally, generate an Auth Token for source maps upload:
- Go to Settings → Auth Tokens → Create New Token
- Give it
project:releases and org:read scopes
- Save it in a separate
.env.sentry-build-plugin file: