@loomtraze/sdk
v0.1.4
Published
Browser SDK for Loomtraze — sessions, errors, network signals, and more.
Downloads
90
Readme
@loomtraze/sdk
Browser SDK for Loomtraze — sessions, errors, network signals, and more.
Quick start (Loomtraze Cloud)
You only need your project API key. The Loomtraze Cloud ingest URL is built into the SDK. You do not configure “the URL of the site to monitor” — that is whatever page loads your app (window.location, clicks, fetch/XHR, etc.).
import { initLoomtraze } from '@loomtraze/sdk';
import { LoomtrazeProvider } from '@loomtraze/sdk/react';
const agent = initLoomtraze({
apiKey: import.meta.env.VITE_LOOMTRAZE_API_KEY,
});
// React: wrap your app
// <LoomtrazeProvider agent={agent}>…</LoomtrazeProvider>Optional: debug: true (or VITE_LOOMTRAZE_DEBUG) for console diagnostics.
If you run your own Loomtraze API, point the SDK at its origin (no path):
initLoomtraze({
apiKey: '…',
apiBaseUrl: 'https://your-looms-api.example.com',
});Or pass a full ingest URL: endpoint: 'https://…/v1/ingest'.
What the “API URL” is not
It is not your product URL or marketing domain. It is only the telemetry backend that receives batches from the SDK. Your users’ sites are observed automatically from the browser once the SDK is on the page.
