React 集成 Sentry (前端错误日志收集系统)

113 阅读1分钟

1.本地启动 sentry-cli sentry-cli --url http://127.0.0.1:9000/ login 其中端口名称必须写.否则会出现 Invalid token: API request failed 的报错信息.

  1. api ——点击用户头像——

3.输入自己的组织名称和项目名称:如:sentry启动地址:http://localhost:9000/sentry/react/
其中:org是组织名称:sentry:,project 是项目名称:react,

4.打开sentry,project-setting-Client Keys——其中dsn为空的话.如果是本地启动sentry,退出重新登陆,会显示配置rootUrl 的地方,需要设置本地的ip地址,不能使用localhost.eg:http://127.0.0.1