@bugtrack/browser
v0.2.0
Published
Browser error tracking SDK for bugtrack.dev — capture, dedupe, and file production errors on the board you already use
Maintainers
Readme
@bugtrack/browser
Browser error tracking for bugtrack.dev — catch production bugs and put them on your board. bugtrack captures and dedupes errors, then files them as issues on the tracker your team already uses (GitHub Issues, GitLab, Linear, issueboard.dev), with two-way resolve/reopen sync and regression detection.
Install
npm install @bugtrack/browserQuickstart
import { init } from '@bugtrack/browser';
init({ projectKey: 'pk_live_xxx' }); // from app.bugtrack.dev → Settings → API KeysThat's it — unhandled exceptions, unhandled promise rejections, and console errors are captured automatically with stack traces and breadcrumbs (clicks, navigation, fetch/XHR), deduplicated server-side, and ready to file on your board.
Options
init({
projectKey: 'pk_live_xxx',
environment: 'production',
release: '1.2.3',
sampleRate: 1.0, // 0.0–1.0
ignoreErrors: [/ResizeObserver/], // string (substring) or RegExp
sanitizeUrls: true, // strip query strings/hashes (default)
maxBreadcrumbs: 100,
beforeSend: (event) => event, // mutate or return false to drop
});Manual capture
import { captureException, captureMessage, setUser, addBreadcrumb } from '@bugtrack/browser';
captureException(new Error('something broke'));
captureMessage('checkout failed validation', 'warning');
setUser({ id: 'user_123', email: '[email protected]' });
addBreadcrumb({ type: 'custom', message: 'cart emptied' });Script tag (no bundler)
<script src="https://bugtrack.dev/sdk/v0.js"></script>
<script>Bugtrack.init({ projectKey: 'pk_live_xxx' });</script>License
MIT
