The problem of not seeing the source code last time has been resolved. I did not see the source code before, because the local run, behind I use docker to start a service, found that can locate the source code, kaison ~
1. Reporting rules
1. Set alarm rules on the server
This can be set in project Setting -> Alert
2. Client Settings
Here are some apis for the Sentry client. We useconfigureScope
Let’s try this one outSet on the client side
Sentry.configureScope((scope) => {
scope.setUser({email: '[email protected]'});
scope.setExtra('character_name', 'Mighty Fighter');
});
Copy the code
After the build, you’ll see the user you just set up and the Extra Data
In addition, setTag, setExtra, setLevel methods can refer to the portal (PS :withScope and configureScope are different scopes
With the current scope changing, so do the others. With-scope creates a copy of the current scope and is completely isolated from the original until the function call completes
Two, distinguish the environment
Process.env.node_env === "production" && sentry. init({release: 'v1.0.6', DSN: 'https://[email protected]/5227797', environment: 'staging', debug: true, // beforeBreadcrumb(breadcrumb, hint) { // console.log(breadcrumb) // return breadcrumb.category === 'ui.click' ? null : breadcrumb; / /}});Copy the code
You can see the environment that you just set up, and you can actually set it uplocal
,relase
Of course you canproject setting
In theenvironment
In the management
More aboutSentry.init
Configuration parameters of,portal
Create a publication and associate it with a commit
1, first inIntegration
Install Github inside
Go to Settings ->Integration-> Install Github
Configure your Github address
2. Create a publication and associate the commit
Official portal
- with
CLI
Create the publication and commit
Create xx.sh files in your own item directory
#! /bin/bash export SENTRY_AUTH_TOKEN= export SENTRY_ORG= export VERSION=v1.0.6 You can associate new multiple sentry-cli releases new -p nanlan-blog $VERSION # with commit, The default is the latest 20 sentry-cli releases - Auto $VERSION # Finally releases Sentry-CLI releases Finalize $VERSIONCopy the code
- run
sh xx.sh
Can be
3. Check whether the operation is successful
- in
release
Is displayed under the menu, indicating that the operation succeeds
4, links,git issue
Click on the panel at the far right of the questionLink Github Issue
Create a linkYou can see that the Github issue has been increased by one
Issue ID of the issueNext time you submit, add the issue id to the submit log and the issue will be removed fromunresolved
becomesolved
git commit -m "fix NANLAN-BLOG-E"
Copy the code