Docs/Getting Started/Sdk Installation

SDK Installation

Unseenr provides native SDKs and is also compatible with the Sentry SDK ecosystem.

Available SDKs

Package Platform Status
@unseenr/node Node.js Published
@unseenr/replay Browser (Session Replay) Published
Sentry SDKs (@sentry/browser, @sentry/node) Any Sentry-supported platform Compatible

Node.js SDK

Installation

npm install @unseenr/node
# or
pnpm add @unseenr/node
# or
yarn add @unseenr/node

Configuration

import * as Unseenr from "@unseenr/node";

Unseenr.init({
  dsn: "https://<PUBLIC_KEY>@app.unseenr.io/<PROJECT_ID>",
});

Capturing Errors

// Automatic - uncaught exceptions are captured automatically

// Manual capture
try {
  riskyOperation();
} catch (error) {
  Unseenr.captureException(error);
}

// Capture a message
Unseenr.captureMessage("Something noteworthy happened");

Session Replay SDK

Installation

npm install @unseenr/replay

The replay SDK is based on rrweb and records browser sessions. Sensitive inputs are masked by default.

Using Sentry SDKs

Unseenr is compatible with Sentry's envelope ingest format. You can point any Sentry SDK at Unseenr by changing the DSN:

import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "https://<PUBLIC_KEY>@app.unseenr.io/<PROJECT_ID>",
});

The authentication header can be either x-sentry-auth or x-unseenr-auth.

DSN Format

The DSN (Data Source Name) identifies your project and authenticates ingest requests. It follows this format:

https://<PUBLIC_KEY>@app.unseenr.io/<PROJECT_ID>
  • PUBLIC_KEY: A unique key generated for your project (found in Project Settings > Client Keys)
  • PROJECT_ID: Your project's numeric ID

You can find your DSN on the Quickstart page of any project, or in Project Settings > Client Keys.

Multiple Client Keys

Each project can have multiple client keys, each with its own DSN. This is useful for separating environments (production, staging, development). You can create and manage client keys in Project Settings > Client Keys.

Environment-Specific DSNs

When you create additional client keys with environment names, each key gets its own DSN. Events sent with that DSN are automatically tagged with the corresponding environment.

Also available in:Deutsch