Getting Started with Observe
Observe is Statly's application error tracking system.
Step 1: Get Your DSN
- Go to Observe in the sidebar
- Click Setup
- Copy your DSN (Data Source Name)
Format: https://[email protected]/your-org
Step 2: Install SDK
Choose the SDK for your language:
JavaScript/Node.js
npm install @statly/observe
import { init, captureException } from '@statly/observe';
init({
dsn: 'https://[email protected]/your-org',
environment: 'production',
});
try {
riskyOperation();
} catch (error) {
captureException(error);
}
Python
pip install statly-observe
from statly_observe import Statly
Statly.init(
dsn='https://[email protected]/your-org',
environment='production',
)
try:
risky_operation()
except Exception as e:
Statly.capture_exception(e)
Go
go get github.com/KodyDennon/statly-go
import statly "github.com/KodyDennon/statly-go"
func main() {
statly.Init(statly.Options{
DSN: "https://[email protected]/your-org",
Environment: "production",
})
defer statly.Close()
defer statly.Recover()
riskyOperation()
}
Step 3: Test
Throw a test error and verify it appears in the Observe dashboard within seconds.