Observe (Error Tracking)
Statly Observe captures errors, exceptions, and events from your applications. Track issues across your stack with SDKs for JavaScript, Python, and Go.
Getting Started
1. Get Your DSN
- Go to Dashboard → Observe → Setup
- Copy your DSN (Data Source Name):
https://[email protected]/your-org2. Install an SDK
npm install @statly/observeimport { init, captureException } from '@statly/observe';
init({
dsn: 'https://[email protected]/your-org',
environment: 'production',
});
try {
riskyOperation();
} catch (error) {
captureException(error);
}Dashboard
The Observe dashboard shows:
Issues List
- Fingerprint grouping: Similar errors are grouped together
- First/last seen: When the error first occurred and most recently
- Event count: Total occurrences
- User impact: Number of affected users
Issue Details
Click an issue to see:
- Full stack trace
- Breadcrumb trail (actions leading to the error)
- Request context (URL, headers, body)
- User context (id, email)
- Tags and extra data
- Release information
Filtering
Filter issues by:
- Environment (production, staging, development)
- Release version
- Status (unresolved, resolved, muted)
- Level (error, warning, info)
- Date range
Releases
Track which releases introduced errors:
Associating Errors with Releases
Set the release option when initializing the SDK:
init({
dsn: '...',
release: '1.2.3', // or process.env.GIT_SHA
});Release Dashboard
View:
- Errors introduced in each release
- Regression detection (errors that reappear)
- Release health metrics
Source Maps
De-obfuscate minified JavaScript stack traces with source maps.
Why Source Maps?
Production JavaScript is typically minified:
Error at e.handleClick (main.abc123.js:1:2345)With source maps, you see the original code:
Error at Button.handleClick (src/components/Button.tsx:45:12)Uploading Source Maps
Option 1: CLI Upload
Use the statly-observe CLI to upload source maps after building:
# Install CLI
npm install -g @statly/observe
# Upload source maps
statly-observe sourcemaps upload \
--dsn="https://[email protected]/your-org" \
--release="1.2.3" \
./distOption 2: API Upload
Upload via the REST API:
curl -X POST "https://statly.live/api/v1/observe/sourcemaps" \
-H "Authorization: Bearer sk_live_xxx" \
-F "release=1.2.3" \
-F "file=@./dist/main.js.map"Option 3: Build Plugin
// webpack.config.js
const { StatlyWebpackPlugin } = require('@statly/observe/webpack');
module.exports = {
plugins: [
new StatlyWebpackPlugin({
dsn: process.env.STATLY_DSN,
release: process.env.GIT_SHA,
}),
],
};Source Map Requirements
- Source maps must be uploaded before errors occur
- The
releasevalue must match between SDK and upload - File names in source maps must match the URLs in stack traces
Source maps are stored securely and never exposed to end users. They're only used server-side for stack trace processing.
Alert Rules
Trigger notifications when errors occur:
Rule Configuration
- Go to Dashboard → Observe → Rules
- Create a rule:
- Name: e.g., "Critical Error Alert"
- Conditions:
- Error level (error, fatal)
- Error count threshold
- Time window
- Actions: Which notification channels to use
Example Rules
| Rule | Condition | Action |
|---|---|---|
| Critical Errors | Level = fatal | PagerDuty, Slack |
| Error Spike | 100+ errors in 5 min | Slack |
| New Error | First occurrence |
User Context
Track which users are affected by errors:
import { setUser } from '@statly/observe';
// After user logs in
setUser({
id: 'user_123',
email: '[email protected]',
username: 'johndoe',
});User Impact Dashboard
- See how many users are affected by each issue
- Identify if errors are isolated or widespread
- Filter issues by specific users
Breadcrumbs
Breadcrumbs record the trail of events leading to an error:
import { addBreadcrumb } from '@statly/observe';
// Manual breadcrumb
addBreadcrumb({
category: 'auth',
message: 'User logged in',
level: 'info',
});
// Automatic breadcrumbs captured:
// - Console logs
// - HTTP requests
// - UI clicks
// - NavigationViewing Breadcrumbs
In the issue details, breadcrumbs show the sequence of events:
12:00:00 - [navigation] User navigated to /checkout
12:00:05 - [http] POST /api/orders (200 OK)
12:00:06 - [ui] Clicked "Place Order" button
12:00:07 - [http] POST /api/payments (500 Error)
12:00:07 - [error] PaymentError: Card declinedMuting & Resolving
Muting Issues
Mute issues you're aware of but can't fix immediately:
- Click the issue
- Click Mute
- Select duration or "Until further notice"
Muted issues won't trigger alerts.
Resolving Issues
Mark issues as resolved when fixed:
- Click the issue
- Click Resolve
- Optionally select a release where it was fixed
If the error reoccurs, it will be automatically reopened.
Data Retention
| Plan | Retention |
|---|---|
| Free | 7 days |
| Hobby | 30 days |
| Pro | 90 days |
| Enterprise | 1 year |
Events older than your retention period are automatically deleted.