Browser JavaScript SDK
Use @tiden/telemetry-browser for client-side browser error tracking.
Install
npm install @tiden/telemetry-browser
Initialize
import { Tiden } from '@tiden/telemetry-browser'
Tiden.init({
dsn: import.meta.env.VITE_TIDEN_DSN,
release: 'my-app@1.2.3',
environment: 'production',
})
The SDK captures uncaught exceptions and unhandled promise rejections.
Manual capture
Tiden.captureException(err)
Tiden.captureMessage('checkout completed', 'info')
Context
Tiden.setUser({ id: 'u_123' })
Tiden.setTag('plan', 'pro')
Important options
| Option | Purpose |
|---|---|
dsn | Required product DSN |
release | Version string |
environment | Runtime environment |
sendDefaultPii | Whether to include default personally identifying data |
beforeSend | Mutate or drop events before send |
denyUrls | Ignore events from matching URLs |
maxBreadcrumbs | Limit stored breadcrumbs |
maxEventsPerPage | Guard against browser error storms |
Source maps
Pair the runtime SDK with @tiden/telemetry-sourcemaps for readable production
stack traces.
npm install -D @tiden/telemetry-sourcemaps
See Upload source maps.