@picked/sentry
v0.0.96
Published
Sentry plugin
Downloads
27,030
Maintainers
Keywords
Readme
Sentry Plugin
This plugin is responsible for listening for the Picked Client eventBus and interacting with a Sentry instance by adding tags and triggering captureMessage and captureException.
This are the events listened by the Plugin:
exception: When anexceptionevent is added to theeventBusthe plugin will automatically check theleveland based on that callcaptureExceptionwhen theleveliserrorandcaptureMessagewhen thelevelisinfo.session: When thesessionevent happens, the Plugin will add the tagpicked.idto the Sentry global scope with the session id as value. Example:picked.id: 000000000feature_decide: When thefeature_decideevent happens, the Plugin will add the tagpicked.feature.[FEATURE_ID]to the Sentry global scope with the bucket as value. Example:picked.feature.my_feature: trueuser_decide: When theuser_decideevent happens, the Plugin will add the tagpicked.is_userwith theuser_decidevalue. Example:picked.is_user: true
⚠️ Version Compatibility
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.
Requirements:
- Sentry SDK Version: This plugin requires Sentry SDK version
^10.0.0 - Peer Dependencies: This plugin requires
@sentry/browserto be installed in the client, as it is a peerdepency in this package. This ensures version compatibility between the client and the plugin - Package Compatibility: All Sentry packages (
@sentry/browser,@sentry/svelte,@sentry/node, etc.) must use the same major version to ensure proper functionality
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.
🚀 Quick Start
Here's a basic example of how to use the Sentry Plugin:
// app.ts file
import { getClient } from '@sentry/svelte'
import { sentryPlugin } from '@picked/sentry'
const client = createClient({
// ... values
plugin: [sentryPlugin(getClient())], // Usually the array of plugins are defined earlier, so you can add the sentry plugin there
})