jovo-community-plugin-sentry
Overview
This plugin for the Jovo Framework allows you to easily add error monitoring with Sentry to your voice projects.
Platforms
The following platforms are supported:
- Amazon Alexa
- Google Assistant
- Samsung Bixby
- Twilio Autopilot
Install
Install the plugin into your Jovo project:
npm install jovo-community-plugin-sentry --save
Use the plugin in:
app.js:
const SentryPlugin = ; app;
app.ts:
; app.use // ... base imports new SentryPlugin;
Configuration
Refer to the Sentry documentation on Configuration.
Supported configuration values:
- dsn
- debug
- release
- environment
- maxBreadcrumbs
- sampleRate
- attachStacktrace
- serverName
config.js or config.ts:
plugin: SentryPlugin: dsn: 'https://sample@sentry.io/0000000' // or set SENTRY_DSN environment: processenvJOVO_STAGE //or set SENTRY_ENVIRONMENT debug: false release: 'voice-app@1.0.0' //or set SENTRY_RELEASE
Here is a typical implementation:
- In
.env
file (forlocal
stage and Jovo Webhook) and in lambda environment variables (for all other stages includingprod
), set theSENTRY_DSN
variable:
SENTRY_DSN = "https://xxx@sentry.io/xxx"
- Set the
environment
value inconfig.js
orconfig.ts
:
plugin: SentryPlugin: environment: processenvJOVO_STAGE
Capture
The plugin will automatically capture exceptions in the code, but you can also access the capture methods from any handler:
this$sentry; this$sentry; this$sentry;
License
MIT