当前位置: 首页 > article >正文

SpringBoot集成Sentry日志收集-1 (Sentry安装)

Sentry

Sentry介绍 :

sentry是一个实时事件日志记录和聚合平台。它专门用于监视错误和提取执行适当的事后操作所需的所有信息, 而无需使用标准用户反馈循环的任何麻烦。

Sentry 是一个日志平台,分为客户端和服务端,客户端(目前客户端有Python, PHP,C#, Ruby等多种语言)就嵌入在你的应用程序中间,
程序出现异常就向服务端发送消息,服务端将消息记录到数据库中并提供一个web节目方便查看。Sentry由python编写,源码开放,性能卓越,
易于扩展,目前著名的用户有Disqus, Path, mozilla, Pinterest等

  • Sentry为前后端报错系统 , 开发必备。

1. 安装 docker , docker-compose

sentry对docker也有版本的要求(注意: 如果版本不对应,安装时会遇到很多问题的)

docker 版本: 20.10.9

docker-compose 版本: 1.28.0

2. 安装sentry

  1. 拉取 onpremise 项目
[root@test sentry]# git clone https://github.com/getsentry/onpremise.git
正克隆到 'onpremise'...
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 1487 (delta 6), reused 8 (delta 2), pack-reused 1466
接收对象中: 100% (1487/1487), 424.38 KiB | 61.00 KiB/s, done.
处理 delta 中: 100% (808/808), done.
  1. 进入到拉好的项目里面 , 修改指定的配置,并进行安装
[root@test sentry]# cd onpremise/
[root@test onpremise]# ll
总用量 52
drwxr-xr-x 2 root root    24 1月  28 09:19 clickhouse
drwxr-xr-x 2 root root    45 1月  28 09:19 cron
-rw-r--r-- 1 root root  9140 1月  28 11:51 docker-compose.yml
drwxr-xr-x 2 root root    38 1月  28 09:19 geoip
drwxr-xr-x 2 root root    47 1月  28 09:19 install
-rwxr-xr-x 1 root root 15541 1月  28 09:19 install.sh
-rw-r--r-- 1 root root  4733 1月  28 09:19 LICENSE
drwxr-xr-x 2 root root    24 1月  28 09:19 nginx
-rw-r--r-- 1 root root  5384 1月  28 09:19 README.md
drwxr-xr-x 2 root root    32 1月  28 09:19 relay
drwxr-xr-x 2 root root    52 1月  28 09:19 scripts
drwxr-xr-x 2 root root   133 1月  28 09:19 sentry
drwxr-xr-x 2 root root    32 1月  28 09:19 symbolicator
-rwxr-xr-x 1 root root  4563 1月  28 09:19 test.sh
drwxr-xr-x 2 root root    24 1月  28 09:19 zookeeper
  1. 修改指定的配置信息
[root@test onpremise]# vim sentry/sentry.conf.example.py

在此文件中,增加如下两行配置信息

# This file is just Python, with a touch of Django which means
# you can inherit and tweak settings to your hearts content.

from sentry.conf.server import *  # NOQA

## 增加此两行即可,避免后期使用时报错(!!!!!!!!!!!)
import socket							
socket.setdefaulttimeout(20)

# Generously adapted from pynetlinux: https://git.io/JJmga
def get_internal_network():
    import ctypes
    import fcntl
    import math
    import socket
    import struct
    .................
  1. 开始安装,时间可能有点长 , 在安装的过程中 , 如果让你选择 yes/no 统一选择yes即可 , 在安装过程中会让你输入邮箱密码,来作为管理员的账号密码,
[root@test onpremise]# ./install.sh 
  1. 脚本安装成功 , 那么开始启动容器
[root@test onpremise]# docker-compose up -d
  1. 容器启动成功 , 那么在浏览器通过 ip:9000 即可访问到登录页面
    在这里插入图片描述

http://www.kler.cn/a/574414.html

相关文章:

  • 论文粗读——Isometric 3D Adversarial Examples in the Physical World
  • Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
  • Linux网络环境配置及常用命令
  • JavaScript 基础语法
  • 【区块链 + 绿色低碳】东方易电城市微电网智能平台 | FISCO BCOS 应用案例
  • C++ 单词识别_牛客题霸_牛客网
  • flink重启策略
  • JMeter 断言最佳实践
  • plt和cv2有不同的图像表示方式和颜色通道顺序
  • pytorch3d学习(一)——开始(架构概述、输入数据、相机坐标系、纹理渲染)
  • Golang的网络流量控制
  • 【每日八股】Redis篇(三):持久化(上)
  • 自律linux 第 34 天
  • 怎么做数据冷热分离?怎么做分库分表?为什么要用ES?
  • 大模型——模型上下文协议 (MCP)
  • 配电柜/环网柜温湿度控制装置 功能参数介绍
  • Android MVC、MVP、MVVM三种架构的介绍和使用。
  • 2025-03-06 ffmpeg提取SPS/PPS/SEI ( extradata )
  • idea中的查看git历史记录,不显示详细信息
  • 锂电池升压到5V并且可以锂电池充电的芯片SM5401