Instrument
SDK
Collect errors, traces, web vitals and logs from Browser, Node.js and Bun apps with @openperf/sdk.
@openperf/sdk is the official JavaScript and TypeScript SDK for OpenPerf. One package covers both browser apps (@openperf/sdk/browser) and Node.js 24.11.1+ / Bun services (@openperf/sdk/node), and includes the openperf CLI for releases and source maps.
npm i @openperf/sdkimport { init } from "@openperf/sdk/browser";
init({ dsn: import.meta.env.VITE_OPENPERF_DSN });Out of the box it captures unhandled errors, page loads, Web Vitals, HTTP requests, database queries, framework spans and structured logs (pino, bunyan).
Full SDK documentation
Platform setup, custom spans, distributed tracing, sampling, releases, TypeScript API reference and CLI docs live in the dedicated SDK section.