series

  1. Sentry-Go SDK Chinese Practice Guide
  2. Let's brush together Sentry For Go Official document Enriching Events
  3. Snuba:Sentry New search infrastructure ( be based on ClickHouse above )
  4. Sentry 10 K8S Cloud native architecture exploration ,Vue App 1 Minutes fast access
  5. Sentry(v20.12.1) K8S Cloud native architecture exploration , Before you play / Back end monitoring and event log big data analysis , High performance and high availability + Scalable cluster deployment
  6. Sentry(v20.12.1) K8S Cloud native architecture exploration ,Sentry JavaScript SDK Three ways to install and load
  7. Sentry(v20.12.1) K8S Cloud native architecture exploration ,SENTRY FOR JAVASCRIPT SDK Configuration details

Basic usage

Sentry Of SDK Hook into your runtime environment , And automatically report errors (errors)、 abnormal (exceptions) And refuse to (rejections).

Key terms :

  • event Is to Sentry An example of sending data . Usually , The data is an error (error) Or abnormal (exception).
  • issue It's a set of similar events .
  • The report of the incident is called capturing. After capturing the event , It will be sent to Sentry.

The most common form of capture is capture errors (capture errors). The errors that can be caught vary from platform to platform . Usually , If you have something that looks like an exception (exception) Things that are , It can be captured . For certain SDK, You can also omit capture_exception Parameters of ,Sentry Will attempt to catch the current exception . To Sentry It's also useful to report errors or messages manually .

When capturing Events , You can also record the crumbs that caused the event (breadcrumbs). Breadcrumbs are different from events : They won't be Sentry Create events in , But it will be buffered before sending the next event . In our Breadcrumbs documentation Learn more about crumbs in .

Capture the error

stay JavaScript in , You can pass the error object to captureException(), To capture it as an event . You can throw a string as an error , In this case, backtracking cannot be recorded .

try {
aFunctionThatMightFail();
} catch (err) {
Sentry.captureException(err);
}

Capture naked messages

Another common operation is to capture naked messages (bare message). The message should be sent to Sentry The text message of . Usually , The message won't go out , But they can be useful for some teams .

Sentry.captureMessage("Something went wrong");

Set the event level

level — Similar to log level — It's usually based on Integration (integration) Default added . You can also override it in an event .

To be in scope External settings level, You can call captureMessage() Every event :

Sentry.captureMessage("this is a debug message", "debug");

To be in scope (scope) Set levels in , You can call setLevel()

Sentry.configureScope(function(scope) {
scope.setLevel(Sentry.Severity.Warning);
});

Or every event :

Sentry.withScope(function(scope) {
scope.setLevel("info");
Sentry.captureException("info");
});

Chinese documents are synchronized to :

 I'm for less .
WeChat :uuhells123.
official account : Hacker afternoon tea .
Thank you for your support !

Sentry(v20.12.1) K8S Cloud native architecture exploration , SENTRY FOR JAVASCRIPT More about the basic use of manually capturing Events

  1. Docker Data Center series ( One )- Quickly build the practice environment of cloud native architecture

    This series of articles demonstrates how to quickly build a simple cloud native architecture practice environment . Based on this infrastructure , The application stack of microservice architecture can be continuously deployed , Practice agile development process , promote DevOps Practical ability . 1 The overall planning 1.1 topology 1.2 Basics ...

  2. .NET Cloud native architect training camp ( Module one Architects and cloud natives )-- Learning notes

    Catalog What is software architecture The basic idea of software architecture Monomer evolves to distributed . Cloud native . Technology Center 1.1 What is software architecture 1.1.1 What is architecture ? Software architecture = {Elements, F ...

  3. new book 《OpenShift Cloud native architecture : Principle and practice 》 Chapter one, section three : Enterprise class PaaS platform OpenShift

    In the past ten years , The field of information technology is undergoing a technological revolution , This change is transforming us from tradition IT Architecture and the era of bloated application system supported by it , Move to the era of cloud native architecture and its supporting agile application system . In this revolution , The emergence of new technology . The speed of renewal and elimination , as well as ...

  4. 12-Factor With cloud native Part2

    12-Factor With cloud native Part2 12-Factor To build the following SaaS Application provides methodology : Use declarative format to build automation , So that new developers spend the least learning cost to join the project Keep it simple with the underlying operating system ...

  5. Review of yunqi dry goods | Cloud native database POLARDB Special field “ hardcore ” analysis

    POLARDB It is a cloud native relational database independently developed by Alibaba , Currently compatible with three database engines :MySQL.PostgreSQL.Oracle.POLARDB The computing power can be expanded to 1000 Supranuclear , Storage capacity up to 100TB ...

  6. 《Kubernetes And cloud native applications 》 Container design pattern of series

    http://www.infoq.com/cn/articles/kubernetes-and-cloud-native-app-container-design-pattern <Kubern ...

  7. Ambassador, Cloud native applications “ goalkeeper ”

    at present , Open source projects in the industry based on the original idea of cloud , It's about management . Control micro service and communication between services under micro service architecture . They effectively solve “ Service isomerization ”.“ Dynamic ”.“ multi-protocol ” What the scene brings east/west Traffic control issues , and ...

  8. Cloud native GIS technology

    Cloud native Architecture Overview - DockOne.io  http://dockone.io/article/2991 Cloud native GIS The whole interpretation of Technology - SuperMap Technology control - CSDN Blog   https://blo ...

  9. How to map cloud native workload to Kubernetes Controller in

    author :Janakiram MSV translator : Yin Longfei Original address :https://thenewstack.io/how-to-map-cloud-native-workloads-to-kubernetes- ...

  10. It started with ALI , Back to the community : Ali 8 Projects enter CNCF Cloud native panorama

    The life force from breaking the ground , From the idealists' faith in technology . Cloud native technology is sweeping the world , Cloud native foundation last year KubeCon +CloudNativeCon NA It was announced on the spot that : Its incubating projects have reached 14 individual , A factory or product that has settled in ...

Random recommendation

  1. Android Inside the picture development -- The basic chapter

    Preface : I used to do TV applications , But because the company is going to produce mobile phones , Personnel tension , So I was transferred to support , I'm Lei Feng ! One of the functions I do is to deal with applications in mobile phones ICON, To deal with it is to beautify it , Regroup and cut with the base plate , It's very ...

  2. Real-time monitoring log file

    A process is running , And keep writing log, You need real-time monitoring log File updates ( It's usually debug Time use ), What do I do , Keep opening , Close the file ? no need , There are at least two ways , From two very common commands : tail -f log.tx ...

  3. Texture packer of game development tools -3. Use GDI+ mapping

    Last time we implemented adding the image we wanted to CTreeCtrl Control , And display a thumbnail of the picture , Now let's talk about the more important part -- Drawing area . In order to realize the function of editing pictures , The drawing area should have the following functions . 1.  Add or delete pictures . ...

  4. codevs 1082 Line tree exercise 3 The template questions

    #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ],sum[ ...

  5. iOS: Wait for the control

    Definition : @interface ViewController () { UIActivityIndicatorView *testActivityIndicator; } Instantiation , Start spinning : -(voi ...

  6. Objective-C Add attribute and principle analysis for class through joint storage

    Joint storage implementation and underlying principle analysis author :wangzz Original address :http://blog.csdn.net/wzzvictory_tjsd/article/details/9347981 Reprint please indicate the source ...

  7. node.js Practice the next day

    Use Express Framework to build a website 1. install Express First, install in global mode Express, Because it's the only way to use it on the command line . Use the following command in the pseudo dos Command window installation express. $ npm ins ...

  8. leaflet.toolbar.js

    leaflet.toolbar.js Reference resources :https://www.javascriptcn.com/read-38464.html

  9. PhysicalBasedRendering( One ) Physics

    A lot of people PBR There is a deviation in our understanding , Can't jump out of the traditional rendering model's thinking circle , Understand it as an algorithm formula with more accurate simulation effect , Although it's true to some extent , But I didn't see PBR The essence of . PBR It's an approximation of light interacting with the environment in the real world ...

  10. leecode Fifth question ( Longest text substring )

    class Solution { public: string longestPalindrome(string s) { int len = s.length(); || len == ) retu ...