← All platforms

JavaScript error tracking

It worked in your browser. Then someone else clicked it. The Sentry JavaScript SDK sends their error reports to Telebugs on your server.

~/hoofnotes  npm install @sentry/browser --save
added 9 packages in 2s
~/hoofnotes  nvim src/instrument.js src/main.js
import * as Sentry from "@sentry/browser";
Sentry.init({
// Copy the complete Telebugs DSN, key and path included.
dsn: "YOUR_TELEBUGS_DSN",
});
// Remove this test once it appears in Telebugs.
Sentry.captureException(new Error("Hello from Hoof Notes"));
import "./instrument.js";
import "./style.css";
import { mountNotes } from "./notes.js";
mountNotes(document.querySelector("#app"));
~/hoofnotes  npm run dev -- --open
> [email protected] dev
> vite --open

  VITE  ready in 182 ms

  ➜  Local:   http://localhost:5173/
  ➜  press h + enter to show help

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep @sentry/browser and point it at your Telebugs DSN. Your errors go straight to your server. No Sentry account needed.

What if the browser just goes quiet?

The SDK reports uncaught browser errors and unhandled promise rejections, even when the page doesn’t show an error message. You can report handled errors yourself, too.

Will I recognize my own code?

Yes. With matching source maps, Telebugs can show the JavaScript or TypeScript you wrote instead of a minified backtrace.

Using a framework, or JavaScript on the server?

We support React, Vue, and Next.js. Node.js has its own server SDK. They can all report to Telebugs.