Browser SDK
Package: @invince/browser.
A telemetry bridge into Invince, not a Datadog or Sentry replacement. JavaScript in the browser only. It wraps fetch, not XHR. Keep Sentry if you already have it and point the DSN at Invince ingest.
Install
npm install @invince/browser@0.1.2
import * as Invince from '@invince/browser';
Invince.init({
ingestKey: 'YOUR_INGEST_KEY',
endpoint: 'https://invince.dev/api/ingest/errors',
release: 'production',
environment: 'production',
});
// After a real login:
// Invince.setUser({ id: user.id });
// Invince.captureLogin();
The ingest key identifies the project. It is meant to ship in the browser bundle.
Optional traceId (and spanId) on init is copied onto error and performance events. Workspace Traces lists rows that share that id. This is correlation, not an OpenTelemetry collector. Do not put emails, names, or other personal data in traceId. Invince does not mint a visitor identifier for you.
What is captured
Uncaught errors, unhandled promise rejections, failed fetch requests, failed script/stylesheet/image loads (capture-phase resource errors the public scanner cannot see), clicks, navigation, and console breadcrumbs (default 50). This is still not a Datadog or Sentry replacement.
Manual capture
Invince.captureException(error);
Invince.captureMessage('Checkout opened', 'info');
Invince.addBreadcrumb('custom', 'Opened billing');
Do not send card numbers, passwords, or children’s data.
Already using Sentry?
Keep the Sentry SDK. Point the DSN at Invince. The public key is the project ingest key:
import * as Sentry from '@sentry/browser';
Sentry.init({
dsn: 'https://YOUR_INGEST_KEY@invince.dev/0',
});
That posts to /api/0/envelope/ (and /api/0/store/). /api/ingest/sentry is the same handler if you set tunnel. Sessions and transactions are ignored. Exceptions become Invince issues. This is not full Sentry API coverage.