The Beacon SDK captures JavaScript errors, performance metrics, and custom logs from your frontend applications.
Installation
Quick Start
Configuration
Automatic Error Capture
The SDK automatically captures:
- Unhandled exceptions -
window.onerror
- Promise rejections -
unhandledrejection
- Console errors -
console.error calls
- Network errors - Failed fetch/XHR requests
Manual Error Reporting
Custom Logs
Breadcrumbs
Breadcrumbs help you understand what happened before an error:
User Context
Set user information for error attribution:
Track page load and custom performance metrics:
React Integration
Filtering Errors
Ignore noisy or irrelevant errors:
Getting Your Key
- Go to Dashboard > Settings > Beacon Keys
- Copy your Public Key (
bpk_...)
- Use this key in your frontend code
Never use your API key (sk_...) in frontend code. The beacon public key is safe to expose.