Sentry & React
Sentry & React
https://docs.sentry.io/platforms/javascript/guides/react/
https://docs.sentry.io/platforms/javascript/guides/react/components/errorboundary/

Sentry.ErrorBoundary & ErrorBoundary
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route } from 'react-router-dom';
import { Provider } from 'react-redux';
import history from '@/utils/history';
import app from '@/views/app';
import store from '@/store';
import ErrorBoundary from '@/components/ErrorBoundary';
// sentry
import * as Sentry from '@sentry/browser';
import * as PACKAGE from '../package.json';
Sentry.init({
environment: `${process.env.NODE_ENV === 'production' ? '生产环境' : '测试环境'}`,
// project-name@version, 如 react-web@0.0.1
// release: 'react-web@0.0.1',
release: `${PACKAGE.name}@${PACKAGE.version}`,
dsn: 'https://xxxxxxx@sentry.xgqfrms.xyz//xx',
});
ReactDOM.render(
// <Sentry.ErrorBoundary fallback={ErrorBoundary} showDialog="false">
<Sentry.ErrorBoundary fallback={ErrorBoundary} showDialog>
<Provider store={store}>
<ConfigProvider locale={zh_CN}>
<Router history={history}>
<Route component={app} />
</Router>
</ConfigProvider>
</Provider>
</Sentry.ErrorBoundary>,
// <ErrorBoundary>
// <Provider store={store}>
// <ConfigProvider locale={zh_CN}>
// <Router history={history}>
// <Route component={app} />
// </Router>
// </ConfigProvider>
// </Provider>
// </ErrorBoundary>,
document.getElementById('app')
);
<button onClick={methodDoesNotExist}>Break the world</button>;
refs
Sentry React SourceMaps All In One
https://www.cnblogs.com/xgqfrms/p/14265055.html
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
Sentry & React的更多相关文章
- Sentry React SourceMaps All In One
Sentry React SourceMaps All In One React https://docs.sentry.io/platforms/javascript/guides/react/ h ...
- Sentry For React 完整接入详解(2021 Sentry v21.8.x)前方高能预警!三万字,慎入!
内容源于:https://docs.sentry.io/platforms/javascript/guides/react/ 系列 1 分钟快速使用 Docker 上手最新版 Sentry-CLI - ...
- Sentry(v20.12.1) K8S 云原生架构探索,1分钟上手 JavaScript 性能监控
系列 Sentry-Go SDK 中文实践指南 一起来刷 Sentry For Go 官方文档之 Enriching Events Snuba:Sentry 新的搜索基础设施(基于 ClickHous ...
- Sentry(v20.12.1) K8S 云原生架构探索,JavaScript 性能监控之管理 Transactions
系列 Sentry-Go SDK 中文实践指南 一起来刷 Sentry For Go 官方文档之 Enriching Events Snuba:Sentry 新的搜索基础设施(基于 ClickHous ...
- Sentry 官方 JavaScript SDK 简介与调试指南
系列 1 分钟快速使用 Docker 上手最新版 Sentry-CLI - 创建版本 快速使用 Docker 上手 Sentry-CLI - 30 秒上手 Source Maps Sentry For ...
- 快速使用 Docker 上手 Sentry-CLI - 玩转 Source Maps 使用 (create-react-app)
系列 快速使用 Docker 上手 Sentry-CLI - 创建版本 入门 使用 sentry-cli 上传 source maps 时,您需要设置构建系统以创建版本(release)并上传与该版本 ...
- python drf+xadmin+react+dva+react-native+sentry+nginx 搭建前后端分离的博客完整平台
前言: 经过差不多半年的开发,搭建从前端到服务器,实现了前后端分离的一个集PC端.移动端的多端应用,实属不易,今天得空,好好写篇文章,记录这些天的成果.同时也做个分享. 演示网站地址: http:// ...
- Sentry 开发者贡献指南 - 前端 React Hooks 与虫洞状态管理模式
系列 Sentry 开发者贡献指南 - 前端(ReactJS生态) Sentry 开发者贡献指南 - 后端服务(Python/Go/Rust/NodeJS) 什么是虫洞状态管理模式? 您可以逃脱的最小 ...
- iOS程序员的React Native开发工具集
本文整理了React Native iOS开发过程中有用的工具.服务.测试.库以及网站等. 工具 你可以选择不同的开发环境:DECO.EXPO或者你可以使用Nuclide+Atom,目前我使用EXPO ...
随机推荐
- Devexpress DockManager多页面浮动窗口会关闭所有页面的问题
注册 DockManager 的 ClosingPanel 事件 private void DockManager1_ClosingPanel(object sender, DockPanelCanc ...
- proxmox ve系统绑定上联外网出口bond双网卡
背景描述:一个客户搭建proxmox ve系统,要求上联出口双网卡绑定bond, proxmox ve下载地址:超链接 记录日期:2020/5/9 前期准备:服务器接好2个网卡 交换机:H3C 1.p ...
- windows ping bat脚本
参考百度链接:https://zhidao.baidu.com/question/577024998.html 要求:1.从同级目录下读取iplist.txt文件内的ip/域名列表(每行一个):2.对 ...
- 解决 win10 无法安装VS2019,visual studio installer下载进度始终为0
解决 win10 无法安装VS2019,visual studio installer下载进度始终为0 目录 解决 win10 无法安装VS2019,visual studio installer下载 ...
- 服务之间的调用为啥不直接用 HTTP 而用 RPC?
什么是 RPC?RPC原理是什么? 什么是 RPC? RPC(Remote Procedure Call)-远程过程调用,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议.比 ...
- LOJ10202樱花——数论
题目描述 原题来自:HackerRank Equations 求不定方程: 1/x+1/y=1/n! 的正整数解 (x,y) 的数目. 输入格式 一个整数 n . 输出格式 一个整数,表示有多少对 ( ...
- Jsp数字格式化
日期格式(2008年5月5日22点00分23秒) <fmt:formatDate value="<%=new Date() %>" pattern="y ...
- Java泛型中的通配符T,E,K,V
Java泛型中的通配符T,E,K,V 1.泛型的好处 2.泛型中的通配符 2.1 T,E,K,V,? 2.2 ?无界通配符 2.3 上界通配符 < ? extends E> 2.4 下界通 ...
- JS:replace
JavaScript中replace() 方法如果直接用str.replace("-","!") 只会替换第一个匹配的字符. 而str.replace(/-/g ...
- 初入Java坑,然后又入产品坑
之前工作了一年,从事Java相关工作,不小心深得领导器重,跑去演讲.写文档.与客户沟通等,最后应公司需要,转往产品坑,坑坑相连,何时逃坑. 最近一直在学习产品经理必备工具Axure,发现这真是一个神奇 ...