All Projects → anteriovieira → Vue Raven

anteriovieira / Vue Raven

Licence: mit
vue-raven automatically reports uncaught JavaScript exceptions triggered from vue component

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Raven

Jetpack
Security, performance, marketing, and design tools — Jetpack is made by the WordPress experts to make WP sites safer and faster, and help you grow your traffic.
Stars: ✭ 1,283 (+1309.89%)
Mutual labels:  plugin
Bitsofbytes
Code and projects from my blog posts.
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Sketch Dockpreview
A Sketch plugin that lets you preview your current artboard in the Dock.
Stars: ✭ 90 (-1.1%)
Mutual labels:  plugin
Paster
Pasting a text data from a clipboard directlly to Sketch text layers [Sketch plugin]
Stars: ✭ 88 (-3.3%)
Mutual labels:  plugin
Entityframeworkcore.dataencryption
A plugin for Microsoft.EntityFrameworkCore to add support of encrypted fields using built-in or custom encryption providers.
Stars: ✭ 88 (-3.3%)
Mutual labels:  plugin
Constantine
A plugin for Clang compiler
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Androidattacher
IDA debugging plugin for android armv7 so
Stars: ✭ 87 (-4.4%)
Mutual labels:  plugin
Filebrowser
📂 Web File Browser
Stars: ✭ 13,854 (+15124.18%)
Mutual labels:  plugin
Facebookclientplugin
Facebook Client Plugin for Xamarin iOS and Android
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Wordpress Seo
Yoast SEO for WordPress
Stars: ✭ 1,301 (+1329.67%)
Mutual labels:  plugin
Pawn.raknet
🛡 Plugin for SA:MP server that allows you to analyze RakNet traffic
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Vueno
Vue Conversion Plugin
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Teepay
Typecho 个人支付宝、微信收款插件
Stars: ✭ 90 (-1.1%)
Mutual labels:  plugin
Uinavigation
A UE4 plugin designed to help easily make UMG menus navigable by mouse, keyboard and gamepad
Stars: ✭ 88 (-3.3%)
Mutual labels:  plugin
Z1 Aggressorscripts
适用于Cobalt Strike的插件
Stars: ✭ 91 (+0%)
Mutual labels:  plugin
Gradle Util Plugins
Fix for windows gradle long classpath issue. Fixes JavaExec tasks that error out with message "CreateProcess error=206, The filename or extension is too long"
Stars: ✭ 87 (-4.4%)
Mutual labels:  plugin
React Guard
🦄 React Guard automagically catches exceptions from React components, extracts useful debug information and prevents White Screen of Death 👻
Stars: ✭ 89 (-2.2%)
Mutual labels:  exceptions
Fzf.kak
FZF for Kakoune
Stars: ✭ 90 (-1.1%)
Mutual labels:  plugin
Award
⚙基于react的服务端渲染框架
Stars: ✭ 91 (+0%)
Mutual labels:  plugin
A File Icon Idea
Atom File Icons plugin for IntelliJ IDEA products
Stars: ✭ 90 (-1.1%)
Mutual labels:  plugin

VueRaven

npm (scoped with tag) vue2 npm CircleCI Codecov donate

VueRaven automatically reports uncaught JavaScript exceptions triggered from vue component, and provides a API for reporting your own errors. The captured errors will be reported to the sentry where you can get an overview of your application. If you do not already have a Sentry account, creating your account will be the first step to using this package.

Installation

npm install --save vue-raven
# or
yarn add vue-raven

Usage

To get started, you need to configure VueRaven to use your Sentry DSN:

Bundler (Webpack, Rollup)

import Vue from 'vue'
import VueRaven from 'vue-raven'

Vue.use(VueRaven, {
  dsn: 'https://<key>@sentry.io/<project>'
})

Browser

<!-- Include after Vue -->

<!-- Local files -->
<script src="vue-raven/dist/vue-raven.js"></script>

<!-- From CDN -->
<script src="https://unpkg.com/vue-raven"></script>

<script>
Vue.use(VueRaven, {
  dsn: 'https://<key>@sentry.io/<project>'
})

const app = new Vue({
  el: '#app',
  // ...
})
</script>

Only these settings allow VueRaven capture any uncaught exception.

Options

Option Type Default Info
dsn String null The Data Source Name
public_dsn String null If value omitted it will be generated using dsn value, by removing private key part.
public_key String null Will be ignored if dsn provided.
private_key String null Will be ignored if dsn provided.
host String sentry.io Will be ignored if dsn provided.
protocol String https Will be ignored if dsn provided.
project_Id String null Will be ignored if dsn provided.
path String null Will be ignored if dsn provided.
disableReport Boolean false Disable all reports.
disableAutoReport Boolean false Disable auto report.
environment String production Sentry's environment.

Reporting Errors

Disable auto report

By default vueraven will report the errors captured automatically, but you can disable using the disableAutoReport option:

import Vue from 'vue'
import VueRaven from 'vue-raven'

Vue.use(VueRaven, {
  dsn: 'https://<key>@sentry.io/<project>'
  disableAutoReport: true,
})

Report errors manually

In some cases you may want to report erros manually, for this you will have the reven-js api available at the instance of the component.

// my-component
export default {
  methods: {
    // ...
    async saveUser() {
      try {
        await User.save(/* data */)
      } catch (err) {
        this.$raven.captureException(err)
      }
    }
  }
}

or

import {Raven} from 'vue-raven';

// my-component
export default {
  methods: {
    // ...
    async saveUser() {
      try {
        await User.save(/* data */)
      } catch (err) {
        Raven.captureException(err)
      }
    }
  }
}

Live demo

We create a small example so you can see the plugin in action.

jsfiddle

error

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].