@statly/observe 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,9 +33,11 @@ pnpm add @statly/observe
|
|
|
33
33
|
|
|
34
34
|
1. Go to [statly.live/dashboard/observe/setup](https://statly.live/dashboard/observe/setup)
|
|
35
35
|
2. Create an API key for Observe
|
|
36
|
-
3. Copy your DSN (format: `https://<
|
|
36
|
+
3. Copy your DSN (format: `https://<key-prefix>@statly.live/<org-slug>`)
|
|
37
37
|
4. Add to your `.env` file: `STATLY_DSN=https://...`
|
|
38
38
|
|
|
39
|
+
**Note**: The DSN contains only a 16-character key prefix (e.g., `sk_live_a1b2c3d4`) which is safe to embed in client-side code. For server-side operations requiring full permissions, use the complete API key.
|
|
40
|
+
|
|
39
41
|
## Quick Start
|
|
40
42
|
|
|
41
43
|
The SDK automatically loads DSN from environment variables, so you can simply:
|
|
@@ -54,7 +56,7 @@ import { Statly } from '@statly/observe';
|
|
|
54
56
|
|
|
55
57
|
// Initialize the SDK
|
|
56
58
|
Statly.init({
|
|
57
|
-
dsn: 'https://
|
|
59
|
+
dsn: 'https://sk_live_a1b2c3d4@statly.live/your-org',
|
|
58
60
|
release: '1.0.0',
|
|
59
61
|
environment: 'production',
|
|
60
62
|
});
|
|
@@ -100,7 +102,7 @@ const app = express();
|
|
|
100
102
|
|
|
101
103
|
// Initialize first
|
|
102
104
|
Statly.init({
|
|
103
|
-
dsn: 'https://
|
|
105
|
+
dsn: 'https://sk_live_a1b2c3d4@statly.live/your-org',
|
|
104
106
|
environment: process.env.NODE_ENV,
|
|
105
107
|
});
|
|
106
108
|
|
|
@@ -192,7 +194,7 @@ import { Statly, statlyFastifyPlugin } from '@statly/observe';
|
|
|
192
194
|
const fastify = Fastify();
|
|
193
195
|
|
|
194
196
|
Statly.init({
|
|
195
|
-
dsn: 'https://
|
|
197
|
+
dsn: 'https://sk_live_a1b2c3d4@statly.live/your-org',
|
|
196
198
|
});
|
|
197
199
|
|
|
198
200
|
// Register the plugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statly/observe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "JavaScript SDK for Statly Observe - Error tracking and monitoring",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|