Sentry 高级使用教程

Sentry versions

https://github.com/getsentry/sentry-docs

https://github.com/getsentry/sentry-docs/edit/master/src/docs/product/releases/index.mdx

Sentry releases

版本控制

https://docs.sentry.io/product/releases/

https://docs.sentry.io/platform-redirect/?next=/configuration/releases/

https://docs.sentry.io/platforms/javascript/#configure





Sentry sourcemaps

https://docs.sentry.io/platforms/javascript/sourcemaps/

https://docs.sentry.io/platforms/javascript/sourcemaps/#capturing-source-maps

process.env.SENTRY_AUTH_TOKEN

https://docs.sentry.io/product/integrations/integration-platform/#internal-integrations

sentry-cli

https://docs.sentry.io/product/cli/configuration/

webpack

https://docs.sentry.io/platforms/javascript/sourcemaps/tools/webpack/

$ yarn add -D @sentry/webpack-plugin

$ yarn add --dev @sentry/webpack-plugin
// webpack.config.js

const SentryWebpackPlugin = require("@sentry/webpack-plugin");

module.exports = {
// other configuration
configureWebpack: {
plugins: [
new SentryWebpackPlugin({
// sentry-cli configuration
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "fullstack-web",
project: "react-app", // webpack specific configuration
include: ".",
ignore: ["node_modules", "webpack.config.js"],
}),
],
},
};

Sentry Health

https://docs.sentry.io/product/releases/health/





Issue Ownership Rules

问题,追责

https://docs.sentry.io/product/error-monitoring/issue-owners/





demo

import * as Sentry from '@sentry/browser';
import { Vue as VueIntegration } from '@sentry/integrations'; import ErrorHandler from './ErrorHandler.js'; import * as PACKAGE from '../package.json';
// const PACKAGE = require('../package.json'); // package 是保留关键字,不能使用
// import * as package from '../package.json';
// const package = require('../package.json'); console.log(' package.name =', PACKAGE.name);
console.log(' package.version =', PACKAGE.version);
// console.log(' package.name =', package.name);
// console.log(' package.version =', package.version); // const isDev = process.env.BABEL_ENV === 'development';
// const isProd = process.env.NODE_ENV === 'production';
// const env = process.env.NODE_ENV === 'production' ? true : false;
const env = process.env.NODE_ENV === 'production' ? 'prod' : 'dev'; Sentry.init({
// To set your release version
release: `$${PACKAGE.name}_${env}@${PACKAGE.version}`,
// release: `$${package.name}_${env}@${package.version}`,
// release: "my-project-name@" + process.env.npm_package_version,
dsn: 'https://666ed2b5eb51410dbe24f05e67fc999@sentry.xgqfrms//110',
integrations: [new VueIntegration({Vue, attachProps: true, logErrors: true})],
}); const errorHandler = new ErrorHandler('vue_error'); Vue.config.errorHandler = (err, vm, info) => errorHandler.onError(err, vm, info); if(env === 'dev') {
// 测试
setTimeout(() => {
console.log('window.Vue; =', window.Vue);
throw new Error(' Sentry Vue Error 测试!');
}, 3000);
}

http://eslint.org/docs/rules/

Parsing error: package is a reserved word in strict mode

ECMAScript 6 中的保留关键字

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Reserved_words

未来保留关键字

以下关键字只在严格模式中被当成保留关键字:

implements

interface

let

package

private

protected

public

static

refs

sourcemap 关联、issue 关联、release 控制

https://segmentfault.com/a/1190000014683598



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


Sentry 高级使用教程的更多相关文章

  1. XSS高级实战教程

    1.[yueyan科普系列]XSS跨站脚本攻击--yueyan 2.存储型XSS的成因及挖掘方法--pkav 3.跨站脚本攻击实例解析--泉哥 4.XSS高级实战教程--心伤的瘦子 5.XSS利用与挖 ...

  2. 推荐一本好的c#高级程序设计教程

    哪位大神推荐一本好的c#高级程序设计教程 小弟在此感激不尽,谢谢

  3. 《吐血整理》高级系列教程-吃透Fiddler抓包教程(34)-Fiddler如何抓取微信小程序的包-上篇

    1.简介 有些小伙伴或者是童鞋们说小程序抓不到包,该怎么办了???其实苹果手机如果按照宏哥前边的抓取APP包的设置方式设置好了,应该可以轻松就抓到包了.那么安卓手机小程序就比较困难,不是那么友好了.所 ...

  4. 渗透测试工具Nmap从初级到高级使用教程

    本文由阿德马翻译自国外网站,请尊重劳动成果,转载请注明出处,谢谢 Nmap是一款网络扫描和主机检测的非常有用的工具.Nmap是不局限于仅仅收集信息和枚举,同时可以用来作为一个漏洞探测器或安全扫描器.它 ...

  5. ASP.NET Aries 高级开发教程:Excel导入之单表配置(上)

    前言: 随着ASP.NET Aries的普及,刚好也有点闲空,赶紧把Excel导入功能的教程补上. Excel导入功能,分为四篇:单表配置(上).多表高级配置(中).配置规则(下).代码编写(番外篇) ...

  6. PyTorch 高级实战教程:基于 BI-LSTM CRF 实现命名实体识别和中文分词

    前言:译者实测 PyTorch 代码非常简洁易懂,只需要将中文分词的数据集预处理成作者提到的格式,即可很快的就迁移了这个代码到中文分词中,相关的代码后续将会分享. 具体的数据格式,这种方式并不适合处理 ...

  7. ASP.NET Aries 高级开发教程:Excel导入之代码编写(番外篇)

    前言: 以许框架提供的导入配置功能,已经能解决95%以上的导入情况,但有些情况总归还是得代码来解决. 本篇介绍与导入相关的代码. 1.前端追加导入时Post的参数: var grid = new AR ...

  8. ASP.NET Aries 高级开发教程:Excel导入之多表高级导入配置(中)

    前言: 在面对Excel的各种复杂导入情况中,多表导入是很常见的情景. 今天就来写一下多表导入是如何配置的. 1.自定义导入模板 怎么自定义: 其实就是自己新建一个Excel了,把列头都写好. 不过有 ...

  9. Spring Boot 2.x零基础入门到高级实战教程

    一.零基础快速入门SpringBoot2.0 1.SpringBoot2.x课程全套介绍和高手系列知识点 简介:介绍SpringBoot2.x课程大纲章节 java基础,jdk环境,maven基础 2 ...

随机推荐

  1. ryu—交换机

    1. 代码解析 ryu/app/example_switch_13.py: from ryu.base import app_manager from ryu.controller import of ...

  2. Mybatis报错:Could not find resource mybatis-conf.xml

    Mybatis报错:Could not find resource mybatis-conf.xml 报错截图: 报错内容: java.io.IOException: Could not find r ...

  3. Vue整合swiper报错Could not compile template .....swiper\dist\css\swiper.css解决办法

    问题描述 今天做一个前端项目,安装幻灯片插件vue-awesome-swiper后 运行npm run dev 后报错如下: `ERROR Could not compile template E:\ ...

  4. hessian-serialization

    http://hessian.caucho.com/doc/hessian-serialization.html Table of Contents 1.  Introduction2.  Desig ...

  5. (转载)微软数据挖掘算法:Microsoft 目录篇

    本系列文章主要是涉及内容为微软商业智能(BI)中一系列数据挖掘算法的总结,其中涵盖各个算法的特点.应用场景.准确性验证以及结果预测操作等,所采用的案例数据库为微软的官方数据仓库案例(Adventure ...

  6. (Sql Server)存储过程(转载)

    SQL Server 存储过程 Transact-SQL中的存储过程,非常类似于Java语言中的方法,它可以重复调用.当存储过程执行一次后,可以将语句缓存中,这样下次执行的时候直接使用缓存中的语句.这 ...

  7. vscode远程开发安装

    https://www.cnblogs.com/xiaoqi/p/vs-code-remote.html ============================= https://blog.csdn ...

  8. Java根据路径获取文件内容

    文章目录 一.思路 二.实现 给出一个资源路径.然后获取资源文件信息,常见三种方式:①网络地址 ②本地绝对路径 ③本地相对路径 一.思路 首先,给出一个string表示资源文件的标识,如何判断是网络中 ...

  9. js将金额转成大写金额

    function Chinese(){ /* var num= $(dialogStruct.iframe.contentDocument.getElementById("contractA ...

  10. PHP-数组相关知识总结

    PHP-数组相关知识总结 (一)数组创建 //创建数组(php5.4 起可以使用短数组定义语法,用 [] 替代 array()) <?php$array = array(    "fo ...