Sentry
@picked/sentry sends the errors of the Picked client to Sentry, and adds Picked tags to
the Sentry scope.
import * as Sentry from '@sentry/browser'
import { createClient } from 'picked'
import { sentryPlugin } from '@picked/sentry'
Sentry.init({ dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0' })
const client = createClient({
projectId: 'your-project-id',
plugins: [sentryPlugin()],
})The plugin has no options. It uses the global Sentry scope of your application.
Requirements
| Peer dependency | Version |
|---|---|
@sentry/browser | ^10 |
@picked/client | The version of your Picked SDK |
All the Sentry packages in your application must have the same version, for example 10.x. A
different version makes a different Sentry scope, and the plugin then sends nothing.
Events
| Client event | Sentry result |
|---|---|
exception with level: 'info' | captureMessage, with the tag picked: true. |
exception with a different level | captureException, with the tag picked: true. |
session | The tag picked.id, with the Picked ID of the visitor as its value. |
feature_decide | The tag picked.feature.<feature ID>, with the bucket of the feature as its value. |
user_decide | The tag picked.is_user, with the result of the condition of the client as its value: true or false. |
The plugin does nothing outside a browser.
