OwlTrace JavaScript

Installation

OwlTrace supports common JavaScript setup paths. Pick the one that matches your app. If you ship bundled assets, also configure sourcemap uploads so stack traces stay readable.

Choose your setup

Vanilla JavaScript

Use this if you initialize OwlTrace directly in app.js or index.js without framework-specific integrations.

Open Vanilla JavaScript guide

React

Use this path when your app needs OwlTrace React error boundary integration and React-specific error reporting guidance.

Open React guide

Vue

Use this setup for Vue 2 or Vue 3 applications that need OwlTrace plugin-style integration.

Open Vue guide

Resolving bundled code

If your app is bundled for production, upload sourcemaps so OwlTrace can map minified stack traces back to your source files.

Errors

Once initialized, OwlTrace automatically captures uncaught browser errors that bubble to the window object.

Reporting errors

For caught exceptions in try/catch, report manually via owlTrace.report(error) so nothing gets missed.

Client hooks

Use client hooks such as beforeEvaluate and beforeSubmit to filter or enrich reports before they are sent.

Data Collection

OwlTrace collects request and runtime metadata to speed up debugging. You can enrich this with your own context.

Adding custom context

Add application-specific values with methods like owlTrace.addContext and context groups for user and business data.

Adding glows

Use glows to annotate report timelines with high-signal events from your app for faster investigation.

Solution providers

Solution providers help attach likely fixes and runbook guidance to recurring issue patterns your team sees often.