Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Real-time event logging and aggregation platform-- Sentry

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

No matter what programming language you use, you will face the problem of how to handle the error log. Many programmers let go of the error log and regret it until it is too late. If you ask the editor what to do, I will recommend Sentry to you!

What is Sentry?

No matter how perfect the program is tested, bug will inevitably exist. Some bug will not appear every time. Code that runs well during testing may stop when a user uses it, but when the program crashes in front of users, you will not see the error. Of course you will say, "Hey, do I keep a journal?"

But to be honest, the program generates a large number of logs every hour of the day, and they are distributed on various servers, and you can't see the number of logs if you have multiple services to maintain. When one day a user really can't stand it, when you call and growl, you will find that the log is useless: lack of context, do not know what the user's actions caused by the exception, too many exceptions (never read the log) do not know how to do it, and so on.

Sentry is here to help us solve this problem. It is an elaborate Django app designed to help developers find active anomalies and potential "bugs" from clueless log files scattered across different servers.

Sentry is a logging platform, which is divided into client and server. The client (currently the client has Python, PHP,C#, Ruby and other languages) is embedded in your application. If there is an exception in the program, the server sends a message to the server. The server records the message in the database and provides a web program for easy viewing. Sentry is written by python, open source, excellent performance, easy to expand, the current famous users are Disqus, Path, mozilla, Pinterest and so on.

Why use Sentry?

Multi-project, multi-user

Friendly interface

You can configure exception departure rules, such as sending mail

Support mainstream language interfaces

Introduction to the permissions of Sentry

Sentry currently has four types of users: Super Admin, Administrator, regular user and System agents. Superusers can only be created from the command line, and other users can register themselves or be invited to join by other users, and then projects and permissions can be assigned by super admins or administrators. In order to better support team assistance and information security

The so-called Team is a team in which some users are organized together and have permission to operate on certain projects. A project can only belong to one Team, but a user can belong to multiple Team and play different roles in different Team. For example, user An is the administrator in Team X and System agents in Team Y. Sentry can only specify user roles to the Team level, not to the Project level, so after adding a user to a Team, the user has the same permissions for all project under that Team.

Although the design of Sentry is not detailed enough, we only need to divide Team and project according to the situation of the real world. For example, we currently have a team, which is responsible for two projects, and we set up a Team An and project an and project b belonging to this Team on Sentry. When we find that the level of project b is high, so that everyone can not see the information, we can set up a virtual Team B, then change the team of project b to Team B, and then add users and corresponding permissions to Team B. Sentry's modifications to team's owner, project's owner, the team to which project belongs, and so on, are all extremely simple and have no side effects.

Here is a brief description of the permissions of each type of user in Sentry:

Super Admin: can create all kinds of users, team and project can only be created by Super Admin. Some settings of the project such as changing Owner, whether the data is publicly visible or not (the data set to public can be viewed without logging in through url), and the setting of domain limits on the client side. There is also permission to manage the project's api key (clients can send messages to Sentry only if they get this api key), and so on.

Administrator: can create users, team and permissions in project settings other than changing owner, and can do resolve, bookmark, public/public and remove operations on specific data in the project.

Ordinary users: no Team interface, can only do resolve, bookmark, public/unpublic and remove operations on the specific data in the project.

System agents: no Team interface, can only do bookmark, unpublic and remove operations on the specific data in the project.

The permissions and entity settings of Sentry can basically meet the actual needs:

1. If a team is responsible for multiple projects, it can be achieved through a single Team with multiple projects.

2. If a person is involved in multiple teams, you can add the user to multiple team.

3. If a team or project sets the corresponding Owner, this person can be responsible for the activities in that team or project. (the only drawback is that team owner cannot create a project)

4. The division of a team or project should be that a manager sets the basic settings of the project, manages the api key, and distributes the api key to the project developers. The project developers log in to Sentry as ordinary users to check errors and resolve errors, and the operation and maintenance staff log in to Sentry as System agents to check the running status of the system.

Have you started looking for downloads for Sentry? Don't worry, you can find Sentry in Haoyuyun City, and you can not only try it for free, but also use it without a click of installation. what are you waiting for? Scan the QR code below or click "read the full text" to use Sentry immediately!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report