Trapify

DSN setup

A DSN (Data Source Name) is the key that tells Trapify which project an incoming event belongs to. Every project has exactly one. It is the only piece of configuration the SDK needs.

Where to find it

Open your project in the Trapify dashboard. The project page shows the DSN key — a 32-character hex string — with a copy button, and a second button that copies the Sentry-format DSN for use with Sentry SDKs.

Using it with the Trapify SDK

Pass the key straight to init:

Native DSN
import * as Trapify from '@trapify-tech/browser';

Trapify.init({ dsn: import.meta.env.VITE_TRAPIFY_DSN });

Using it with a Sentry SDK

If you are already instrumented with Sentry, keep the SDK and change the DSN. Sentry SDKs refuse to parse a DSN whose project id is not numeric, so Trapify publishes a numeric id derived from your DSN key specifically for this purpose — it addresses the same project.

Sentry-format DSN
# Sentry-format DSN — for use with an existing Sentry SDK.
# The numeric id is derived from your DSN key; both come from project settings.
SENTRY_DSN=https://<key>@trapify.tech/<numeric-id>

Full details, including which SDK features are supported, are in the Sentry compatibility guide.

What a DSN authorises

A DSN is a write-only ingest credential. It permits submitting events to one project and nothing else. It cannot read your issues, cannot see your organisation, cannot change settings, and cannot be exchanged for a session. This is why it is safe to ship in a browser bundle, where it is inevitably public.

What a leaked DSN does allow is someone else writing junk events into your project and burning your monthly quota. Ingest is rate-limited per DSN, which blunts that.

Rotating a DSN

Not available yet. A project's DSN is generated when the project is created and cannot currently be rotated in place. There is also no self-service project deletion, so a leaked DSN cannot be retired from the dashboard either. If a DSN is being abused, create a new project, point your SDK at its DSN, and email support@trapify.tech to have the old project deleted. Rotation is on the roadmap. We would rather say this plainly than let you plan around a revocation control that does not exist.

Handling it safely