homework-jianmu/tests/script/telemetry/crash-report
jiajingbin fb682e441c doc: add example for .env 2025-01-23 15:07:27 +08:00
..
.env.example enh: rename 2025-01-23 13:45:56 +08:00
CrashCounter.py enh: rename 2025-01-23 13:45:56 +08:00
CrashCounter.py.old enh: rename 2025-01-23 13:45:56 +08:00
README-CN.md doc: add example for .env 2025-01-23 15:07:27 +08:00
README.md doc: add example for .env 2025-01-23 15:07:27 +08:00
filter1.sh
filter2.sh
filter_assert.sh
filter_nassert.sh

README.md

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Running

1. Introduction

This manual is intended to give developers comprehensive guidance to collect crash information from the past 7 days and report it to the FeiShu notification group.

[!NOTE]

  • The commands and scripts below are verified on Linux (CentOs 7.9.2009).

2. Prerequisites

  • Install Python3
yum install python3
yum install python3-pip
  • Install Python dependencies
pip3 install requests python-dotenv
  • Adjust .env file
cd $DIR/telemetry/crash-report
cp .env.example .env
vim .env
...
  • Example for .env
# Filter to exclude IP (Company network export IP)
EXCLUDE_IP="192.168.1.10"
# Official website server IP
SERVER_IP="192.168.1.11"
# Internal network providing HTTP service IP and port, used for HTML report browsing
HTTP_SERV_IP="192.168.1.12"
HTTP_SERV_PORT=8080
# Webhook address for feiShu group bot
FEISHU_MSG_URL="https://open.feishu.cn/open-apis/bot/v2/hook/*******"
# Owner
OWNER="Jayden Jia"

3. Running

In $DIR/telemetry/crash-report directory, there are several files with names like 202501**.txt. The python script will collect crash information from these text files and send report to your Feishu bot group.

cd $DIR/telemetry/crash-report
python3 CrashCounter.py