This package has been deprecated

Author message:

Use Nuxt's runtime config instead

@tanakaworld/nuxt-sentry

0.1.1 • Public • Published

nuxt-sentry

CircleCI npm

A sentry module for Nuxt with nuxt-env

Features

The module enables error logging through Sentry.

nuxt-env is supported, so you can set DSN via runtime environment.

Dependencies

Get Started

$ npm i -S @tanakaworld/nuxt-sentry
# or
$ yarn add @tanakaworld/nuxt-sentry
{
  modules: [
    '@tanakaworld/nuxt-sentry'
  ]
  // able to set options via process.env in runtime
}

// or

{
  modules: [
    '@tanakaworld/nuxt-sentry'
  ],
  sentry: {
    disabled: false
  }
}

Usage

Enter your DSN in nuxt.config.js. Additional config settings can be found here.

Usage in Vue component

In a Vue component, Sentry is available as this.$sentry, so we can call functions like

this.$sentry.captureException(new Error('example'))

where this is a Vue instance.

Options

Options can be passed using either environment variables or sentry section in nuxt.config.js. Normally setting required DSN information would be enough.

dsn

  • Type: String
    • Default: process.env.SENTRY_DSN

disabled

  • Type: Boolean
    • Default: process.env.SENTRY_DISABLED || false

environment

  • Type: String
    • Default: process.env.SENTRY_ENVIRONMENT

release

  • Type: String
    • Default: process.env.SENTRY_RELEASE

License

MIT License

Copyright (c) tanakaworld yutaro.tanaka.world@gmail.com

Readme

Keywords

Package Sidebar

Install

npm i @tanakaworld/nuxt-sentry

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

910 kB

Total Files

49

Last publish

Collaborators

  • tanakaworld