Integrations · SDK

SDK integration

Nightlamp speaks the Sentry store API. Any @sentry/* client, configured with a Nightlamp DSN, will deliver events to your Issue queue without code changes beyond the SDK init.

How do I get my Nightlamp DSN?

On app creation, Nightlamp returns a public DSN URL of the form https://<dsn-key>@api.nightlamp.app/api/<app-id>/store/. Save it — the raw DSN is shown once and is unrecoverable. If you've lost it, rotate via the integrations page; the previous DSN stops authenticating immediately.

Heads up. The DSN is a write-events-only credential — it can't read issues, modify monitors, or touch any other surface. Treat it as semi-public; don't publish it, but don't panic if it leaks: rotation is one click.

How do I send events from JavaScript or TypeScript?

Install the Sentry browser SDK:

Install

npm install @sentry/browser

Initialize before your app boots — typically the first import in main.ts:

src/main.ts

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

Sentry.init({
  dsn: 'https://<your-dsn-key>@api.nightlamp.app/api/<your-app-id>/store/',
  environment: import.meta.env.MODE,
  release: __APP_VERSION__,
  tracesSampleRate: 0.1,
});

Replace <your-dsn-key> and <your-app-id> with the values from your integrations page. The pre-filled snippets there already include them.


How do I send events from Python?

Install the SDK + the integration relevant to your framework (FastAPI, Django, Flask, etc.):

Install

pip install "sentry-sdk[fastapi]"

app/main.py

import sentry_sdk
from sentry_sdk.integrations.fastapi import FastApiIntegration

sentry_sdk.init(
    dsn='https://<your-dsn-key>@api.nightlamp.app/api/<your-app-id>/store/',
    environment='production',
    release='1.42.0',
    traces_sample_rate=0.1,
    integrations=[FastApiIntegration()],
)

Which other SDKs are supported?

Every @sentry/* client works the same way — it's a configuration swap, not a code change. If you've already wired Sentry, paste the Nightlamp DSN over the existing one and your events route here.

  • Go: github.com/getsentry/sentry-go
  • Ruby: sentry-ruby + sentry-rails
  • PHP: sentry/sentry
  • Node: @sentry/node (server-side counterpart of @sentry/browser)

How do I verify ingestion is working?

Use the Test connection button on the integrations page to fire a synthetic event under your session — no SDK install required for the smoke test. Nightlamp normalizes and fingerprints it without creating an Issue.