sentry-browser-sdk

Configure and deploy the Sentry Browser SDK for error monitoring, tracing, and replay.

246|29|Updated Nov 10, 2025
One-click install
npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-browser-sdk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sentry-browser-sdk
Source: https://github.com/getsentry/sentry-for-ai/tree/main/skills/sentry-browser-sdk
Command: npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-browser-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This feature-rich Skill streamlines the setup and configuration of the Sentry Browser SDK to monitor errors, performance, and session replay in web applications, reducing onboarding time and integration overhead.

Core Features & Use Cases

  • Error monitoring: capture uncaught exceptions and unhandled promises in vanilla JS, WordPress, or static sites.
  • Tracing and session replay: enable performance tracing and user-session recordings to reproduce issues.
  • Flexible delivery options: install via npm (@sentry/browser), Loader Script for static sites, or CDN bundles for quick, zero-build deployments.

Quick Start

Install the library and initialize the SDK on page load with browser-focused defaults.

Frequently Asked Questions about sentry-browser-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Sentry browser error monitoring to a vanilla JavaScript app?▼

To add Sentry browser error monitoring, install @sentry/browser via npm and initialize the SDK on page load with browser-focused defaults. This setup captures uncaught exceptions and unhandled promise rejections automatically.

Can I use the Sentry Browser SDK for session replay and performance tracing on static HTML pages?▼

Yes, the Sentry Browser SDK supports performance tracing and session replay on static HTML pages. You can enable these features to record user sessions and reproduce issues without needing a complex build environment.

What is the best way to deploy web monitoring on a WordPress site without a build step?▼

The best way to deploy web monitoring without a build step is using the Sentry Loader Script or CDN bundles. This approach allows zero-build deployments for static sites and WordPress installations.

Does this Sentry error tracing setup work with single page applications?▼

Yes, this Sentry error tracing setup works with single page applications (SPAs) where framework-specific SDKs are not applicable. It captures errors, traces performance, and records session replays.

What version of @sentry/browser is required for session replay and tracing?▼

Session replay and tracing require @sentry/browser version 7.0.0 or higher. You can bundle this dependency via npm or load it dynamically using the Loader Script for your web application.