@umbrelog/browser
v1.0.1
Published
Browser Error Capture for Umbrelog, an AI-powered Log Management Platform — same log pipeline as Node
Maintainers
Readme
@umbrelog/browser
Umbrelog Browser Error Capture — the Browser runtime of the Umbrelog SDK for Umbrelog, an AI-powered Log Management Platform.
Browser logs enter the same ingestion pipeline as Node logs. They are not a separate product.
This package is not RUM, Session Replay, Performance Monitoring, or Browser Observability.
Requirements
- Modern browsers with
fetch(and ideallykeepalivesupport)
Install
npm install @umbrelog/browserCreate a Browser Client Token
In the Umbrelog dashboard → Account settings → Browser client tokens, create a token (ubc_…).
Do not put a server API key (dl_…) in browser bundles. Server keys can access more than log ingest.
Quick start
import { createLogger } from '@umbrelog/browser';
const logger = createLogger({
clientToken: 'ubc_…',
service: 'web',
application: 'checkout-web', // or app: 'checkout-web'
env: 'production',
release: '1.4.2', // optional
});
logger.error('Checkout failed', { orderId: 'ord-1' });Automatic capture (default on):
window.onerrorunhandledrejection
Use application when one organization has several frontends (checkout-web, admin-panel, marketing-site, docs) while service remains the registry / investigation scope.
Optional singleton
import { init, getLogger } from '@umbrelog/browser';
init({
clientToken: 'ubc_…',
service: 'web',
application: 'checkout-web',
env: 'production',
});
getLogger()?.error('Something went wrong');Supported frameworks
- React
- Next.js
- Vue
- Angular
- Svelte
- Remix
All frameworks use the same Browser SDK. There is no separate React/Next/Vue package — call createLogger / init once at app startup (client-side only).
Correlation (optional)
You can attach trace_id, execution_id, and correlation_id via config or per-log attributes. Automatic distributed tracing is not implemented yet.
Sampling (future-ready)
createLogger({
clientToken: 'ubc_…',
service: 'checkout-web',
sampleRate: 1, // default 100%
maxEventsPerMinute: undefined,
});What is captured vs not
| In scope | Out of scope |
|----------|----------------|
| JS errors (window.onerror) | Session Replay |
| Unhandled promise rejections | RUM / Web Vitals |
| Manual logger.error/warn/info | Network / performance monitoring |
| | Console interception / DOM recording |
Runtime identity
Browser logs include:
runtime = browserplatform = websource = browser(orwindow.onerror/unhandledrejection)
Documentation
- Product docs: umbrelog.com/docs
- Pricing: umbrelog.com/pricing
- Interactive demo: app.umbrelog.com/demo-site
- Website: umbrelog.com
- Dashboard: app.umbrelog.com
License
ISC — see LICENSE.
