@picked/sentry 0.0.101-next.2 → 0.0.101
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 +31 -26
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @picked/sentry
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Reports the errors of the Picked client to Sentry, and tags Sentry events with the Picked
|
|
4
|
+
session, feature flags and user decision.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## Install
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- `user_decide`: When the `user_decide` event happens, the Plugin will add the tag `picked.is_user` with the `user_decide` value. Example: `picked.is_user: true`
|
|
11
|
-
|
|
12
|
-
## ⚠️ Version Compatibility
|
|
13
|
-
|
|
14
|
-
This plugin depends on Sentry's internal carrier implementation. **Version mismatches between your application's Sentry SDK and the version used by `@picked/sentry` plugin will cause the plugin to stop working.**
|
|
15
|
-
|
|
16
|
-
**Requirements:**
|
|
17
|
-
|
|
18
|
-
- **Sentry SDK Version**: This plugin requires Sentry SDK version `^10.0.0`
|
|
19
|
-
- **Peer Dependencies**: This plugin requires `@sentry/browser` to be installed in the client, as it is a peerdepency in this package. This ensures version compatibility between the client and the plugin
|
|
20
|
-
- **Package Compatibility**: All Sentry packages (`@sentry/browser`, `@sentry/svelte`, `@sentry/node`, etc.) must use the same major version to ensure proper functionality
|
|
21
|
-
|
|
22
|
-
**Note**: Install the appropriate Sentry package for your framework alongside this plugin. The plugin will use the same Sentry instance from the client, preventing version conflicts.
|
|
8
|
+
```bash
|
|
9
|
+
npm install picked @picked/sentry @sentry/browser
|
|
10
|
+
```
|
|
23
11
|
|
|
24
|
-
|
|
12
|
+
Requires Sentry SDK 10. Every Sentry package in your application must be on the same major
|
|
13
|
+
version, or the plugin and your application see different Sentry scopes.
|
|
25
14
|
|
|
26
|
-
|
|
15
|
+
## Usage
|
|
27
16
|
|
|
28
17
|
```typescript
|
|
29
|
-
|
|
30
|
-
import {
|
|
18
|
+
import * as Sentry from '@sentry/browser'
|
|
19
|
+
import { createClient } from 'picked'
|
|
31
20
|
import { sentryPlugin } from '@picked/sentry'
|
|
32
21
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
Sentry.init({ dsn: 'your-sentry-dsn' })
|
|
23
|
+
|
|
24
|
+
export const picked = createClient({
|
|
25
|
+
projectId: 'your-project-id',
|
|
26
|
+
plugins: [sentryPlugin()],
|
|
36
27
|
})
|
|
37
28
|
```
|
|
29
|
+
|
|
30
|
+
| Client event | In Sentry |
|
|
31
|
+
| ---------------- | ------------------------------------------------------------------------------------- |
|
|
32
|
+
| `exception` | `captureMessage` at `info` level, otherwise `captureException`; tagged `picked: true` |
|
|
33
|
+
| `session` | Tag `picked.id`: the session ID |
|
|
34
|
+
| `feature_decide` | Tag `picked.feature.<feature ID>`: the bucket |
|
|
35
|
+
| `user_decide` | Tag `picked.is_user` |
|
|
36
|
+
|
|
37
|
+
## Docs
|
|
38
|
+
|
|
39
|
+
- **Web:** [Sentry](https://docs.picked.app/reference/sdk/plugins/sentry)
|
|
40
|
+
- **Local:** `node_modules/picked/docs/reference/sdk/plugins/sentry.md`. The `picked` package carries every page under `node_modules/picked/docs/`.
|
|
41
|
+
- **CLI:** `npx picked docs read /reference/sdk/plugins/sentry`. `npx picked docs list [words]` lists the pages.
|
|
42
|
+
- **MCP:** call `read_picked_doc` with `{ "path": "/reference/sdk/plugins/sentry" }`; `list_picked_docs` lists the pages. Add the server with `claude mcp add --transport http picked https://api.picked.app/mcp`, or see [How to connect the MCP server](https://docs.picked.app/how-to/connect-the-mcp-server) for other tools.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/sentry",
|
|
3
3
|
"description": "Sentry plugin",
|
|
4
|
-
"version": "0.0.101
|
|
4
|
+
"version": "0.0.101",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@picked/client": "workspace:*",
|
|
7
7
|
"@picked/svelte": "workspace:*",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"main": "./dist/cjs/index.js",
|
|
48
48
|
"module": "./dist/esm/index.js",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@picked/client": "0.0.101
|
|
50
|
+
"@picked/client": "0.0.101",
|
|
51
51
|
"@sentry/browser": "^10"
|
|
52
52
|
},
|
|
53
53
|
"private": false,
|