All Projects → youzan → Raven Weapp

youzan / Raven Weapp

Sentry SDK for WeApp

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Raven Weapp

Sentry Miniapp
Sentry 小程序/小游戏 SDK:用于小程序/小游戏平台的 Sentry SDK(目前支持微信、字节跳动、支付宝、钉钉、QQ、百度小程序,微信、QQ 小游戏)
Stars: ✭ 269 (+89.44%)
Mutual labels:  error-handling, sentry, weapp
Sentry Laravel
Laravel SDK for Sentry
Stars: ✭ 927 (+552.82%)
Mutual labels:  sentry, crash-reporting
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+425.35%)
Mutual labels:  error-handling, crash-reporting
Bugsnag Android Ndk
DEPRECATED - this project now lives at bugsnag/bugsnag-android
Stars: ✭ 42 (-70.42%)
Mutual labels:  error-handling, crash-reporting
Sentry Cli
A command line utility to work with Sentry.
Stars: ✭ 567 (+299.3%)
Mutual labels:  sentry, crash-reporting
Sentry Javascript
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
Stars: ✭ 6,012 (+4133.8%)
Mutual labels:  sentry, crash-reporting
Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+20815.49%)
Mutual labels:  sentry, crash-reporting
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+160.56%)
Mutual labels:  sentry, crash-reporting
Sentry
Middleware to integrate with sentry crash reporting.
Stars: ✭ 55 (-61.27%)
Mutual labels:  sentry, crash-reporting
Sentry Clj
Sentry SDK for Clojure
Stars: ✭ 63 (-55.63%)
Mutual labels:  sentry, crash-reporting
Raven.cr
Raven is a Crystal client for Sentry
Stars: ✭ 96 (-32.39%)
Mutual labels:  sentry, crash-reporting
Bugsnag Php
Bugsnag error monitoring and crash reporting tool for PHP apps
Stars: ✭ 475 (+234.51%)
Mutual labels:  error-handling, crash-reporting
Sentry Dart
Sentry SDK for Dart and Flutter
Stars: ✭ 428 (+201.41%)
Mutual labels:  sentry, crash-reporting
Bugsnag Js
Javascript error handling tool for Bugsnag. Monitor and report JavaScript bugs & errors.
Stars: ✭ 625 (+340.14%)
Mutual labels:  error-handling, crash-reporting
Sentry Go
Official Sentry SDK for Go
Stars: ✭ 415 (+192.25%)
Mutual labels:  sentry, crash-reporting
Sentry Python
The new Python SDK for Sentry.io
Stars: ✭ 870 (+512.68%)
Mutual labels:  sentry, crash-reporting
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+1020.42%)
Mutual labels:  sentry, crash-reporting
Sentry Kubernetes
Kubernetes event reporter for Sentry
Stars: ✭ 345 (+142.96%)
Mutual labels:  sentry, crash-reporting
Bugsnag React Native
Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
Stars: ✭ 374 (+163.38%)
Mutual labels:  error-handling, crash-reporting
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-66.2%)
Mutual labels:  error-handling, crash-reporting

Raven-weapp

为方便小程序接入sentry,由raven改写而来的小程序版本。

引入文件

由于目前小程序不支持从node_modules中引入文件,因此以npm方式安装的话只能手动将raven-weapp/dist目录下需要的文件拷贝到其他文件中,在app.js中引入,例如:

var Raven = require('./utils/raven-weapp/build/raven')

或以Bower安装raven-weapp并引入:

var Raven = require('./bower_components/raven-weapp/build/raven')

初始化Raven

Raven.config('https://[email protected]/x', options).install()

在app的onLaunch中初始化(?),options为可选配置对象,目前支持:

options = {
    release: '当前小程序版本',
    environment: '指定为production才会上报',
    allowDuplicates: true, // 允许相同错误重复上报
    sampleRate: 0.5 // 采样率
}

收集信息

收集的信息将在上报时被一起带上

基本信息

初始化后raven会默认收集以下信息:

{
    SDKversion: '小程序基础库版本',
    WXversion: '微信版本',
    device: '设备型号',
    network: '网络类型',
    system: '系统信息',
}

可以通过Raven.setUserContext(context)或者Raven.setExtraContext(context)添加更多信息(kdtId和userId等)

用户行为
console

console的行为默认将被自动收集

ajax

wx.request不可扩展,因此只能手动收集请求的行为:例如在经过封装的请求函数的成功回调内添加:

Raven.captureBreadcrumb({
  category: 'ajax',
  data: {
    method: 'get',
    url: 'weapp.showcase.page/1.0.0/get',
    status_code: 200
  }
dom

ui操作的记录暂不支持

location

页面变化的记录暂不支持

信息上报

分为message和exception的上报

message

使用Raven.captureMessage(msg, option)上报需要上报的信息比如ajax的报错等

exception

所有uncaught exception都会被小程序捕获封装成msg传递到app的onError中,在onError中上报这些信息:

onError(msg) {
    Raven.captureException(msg, {
      level: 'error'
    })
  }
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].