JS SDK Reference (coming soon)
Overview

JS SDK Overview

⚠️

Not available yet. The TracePath browser SDK is not published. There is no package to install, and the @tracepath scope on npm belongs to an unrelated third party, so do not run an install command for it. These pages document the planned browser integration. To send telemetry to TracePath today, use OpenTelemetry over OTLP/HTTP; email [email protected] to hear when the browser SDK ships.

The TracePath JavaScript SDK is the planned error-tracking layer for browser applications. It will capture uncaught exceptions, unhandled promise rejections, custom messages and session replays, and ship them to the TracePath ingest endpoint.

Planned packages

PackageRole
Core browser SDKFramework-agnostic capture, batching and upload
React bindingsProvider that doubles as an error boundary, plus hooks
Vue bindingsVue 3 plugin and composables
Svelte bindingsContext-based setup for Svelte and SvelteKit
jQuery bindingsAdds automatic $.ajax() error capture on top of the core SDK

The framework packages are thin wrappers: they share one capture pipeline, one set of options and one wire format, so anything on these reference pages applies to all of them unless a page says otherwise.

What the browser SDK will do

  • Automatic capture of uncaught errors (window.onerror) and unhandled promise rejections, installed once at startup.
  • Batching of captured events, with a debounce window and a retry delay, so a busy page makes few requests.
  • Stack traces resolved back to your original source through uploaded source maps and debug IDs — both of which are already implemented server-side.
  • Custom attributes (userId, tenant, feature flags) attached to every event.
  • Session replay of the DOM leading up to an error.
  • Distributed tracing that links a browser error to the backend request that caused it.

What works today instead

The server half of every one of those features is already live. If you have a JavaScript backend, instrument it with OpenTelemetry and you get endpoint latency, exceptions, logs and metrics right now:

For a browser app with no backend of its own, synthetic monitors can watch it from the outside today without any code in the page.

Reference pages

PageCovers
InitializationPlanned options, error filtering, attributes
ExceptionsWhat an exception carries and how attributes behave
MessagesNon-error events
Distributed TracingThe header contract, and the backend half you can build today
Flush & LifecycleBatching behaviour
Source MapsThe upload API, which is live today
Debug IDsContent-addressed map matching
Session ReplayDOM recording and privacy masking