← All platforms

Gatsby error tracking

Static pages still run JavaScript in somebody’s browser. The Sentry Gatsby plugin sends those error reports to Telebugs, where they stay on your server.

~/hoofnotes  npm install @sentry/gatsby
~/hoofnotes  nvim gatsby-config.js sentry.config.ts
module.exports = {
plugins: ["@sentry/gatsby"],
};
import * as Sentry from "@sentry/gatsby";
Sentry.init({
// Copy the complete Telebugs DSN, key and path included.
dsn: "YOUR_TELEBUGS_DSN",
});
~/hoofnotes  npm run develop

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

Hang on, I already use Sentry

Keep @sentry/gatsby and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Why track errors on a static site?

Hydration, client-side navigation, and interactive components can fail after the build succeeds. Those browser exceptions are application errors, and Telebugs can receive them.

Will I recognize my source code?

Yes. Give Telebugs the matching source maps and it can show your original files and line numbers instead of a minified backtrace.