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. 深度学习论文翻译解析(十七):MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications

    论文标题:MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications 论文作者:Andrew ...

  2. 浅析 record 使用场景

    浅析 record 使用场景 Intro 之前我们有介绍过 record 基本知识,record 会实现基于值的类型比较,最近遇到的几个问题觉得用 record 来解决会非常方便,分享一下 基于值的类 ...

  3. Java Socket InetAddress类 Socket DatagramPacket TCP、UDP示例

    java.net :为实现网络应用程序提供类. InetAddress类 方法摘要 方法摘要 boolean equals(Object obj) : 将此对象与指定对象比较. byte[] getA ...

  4. Python学习【第5篇】:数据类型和变量总结

    字符串,数字,列表,元组,字典 可变不可变 1.可变:列表 如: p.p1 { margin: 0; font: 11px Menlo; color: rgba(0, 0, 0, 1); backgr ...

  5. 前端调用微信小程序的支付流程

    目录 1,前言 2,流程 3,参数说明 4,具体代码 1,前言 分享一个完整的微信小程序支付流程中,前端要做的模块. 2,流程 在调用wx.requestPayment之前,需要准备一些参数,流程如下 ...

  6. (三)SpringBoot停止服务的方法

    SpringBoot停止服务的方法 第一种:actuator 第二种:context 第三种:进程号 第四种:SpringApplication.exit() 第五种:自定义Controller Sp ...

  7. 13.Linux文件存储系统

    1.Linux 系统中的文件存储结构 Linux系统中常见的目录名称以及相应内容 2.系统内核中的udev 设备管理器会自动把硬件名称规范起来,目的是让用户通过设备文件的名字可以猜出设备大致的属性以及 ...

  8. 小白搭建WNMP详细教程---MYSQL安装与设置

    MYSQL的安装请参考WAMP中的mysql的安装教程,两者是一样的. https://www.cnblogs.com/missbye/p/12050312.html

  9. SpringBoot整合spring-security-oauth2完整实现例子

    SpringBoot整合spring-security-oauth2完整实现例子 技术栈 : springboot + spring-security + spring-oauth2 + mybati ...

  10. Educational Codeforces Round 97 (Rated for Div. 2)【ABCD】

    比赛链接:https://codeforces.com/contest/1437 A. Marketing Scheme 题解 令 \(l = \frac{a}{2}\),那么如果 \(r < ...