How Alibaba’s Xianyu Team Automates Exception Log Tracking and Bug Assignment

The Xianyu team built an automated pipeline that scans pre‑release exception logs, extracts stack‑trace details with regex, maps them to Git file paths and commit authors, and instantly distributes precise bug tickets to the responsible developers, dramatically cutting debugging cost and time.

dbaplus Community
dbaplus Community
dbaplus Community
How Alibaba’s Xianyu Team Automates Exception Log Tracking and Bug Assignment

Background

To discover, locate, and resolve pre‑release issues efficiently, the Xianyu team created an automated exception‑log tracking, locating, and distribution mechanism. Because Xianyu lacks a daily environment, debugging, integration, and testing all happen in the pre‑release stage, causing a surge of problems there.

Problems with the Manual Process

Previously, scanned exceptions were first filtered by testers, then assigned to a designated developer owner for each application. The owner had to inspect the code to decide if the bug was theirs, often forwarding it to others. This two‑sided effort incurred high costs, especially when many bugs required developers to manually trace code lines.

Solution Overview

The new system automates the entire workflow: periodic log scanning, precise line‑level identification, and automatic assignment to the commit author, achieving zero‑cost detection, rapid location, and fast, accurate distribution of bugs.

Implementation Details

Filter exception stack information – When an exception is detected, the system records the raw log and uses regular expressions to extract stack entries containing the keyword at. Each at line provides a full class path and line number, which are collected in bulk.

Extract exception code lines – From each stack entry, the class name (e.g., AXXXXXXX.java) and line number (e.g., 447) are parsed. Typically five such entries are gathered because earlier frames may belong to framework code, while later frames point to the developer’s code.

Obtain target branch information – The pre‑release environment may host multiple branches. The mechanism retrieves the branch associated with the log’s deployment and also includes the master branch as a fallback for cases where the issue originates outside the current branch.

Get Git file path – Using the application’s repository ID, the target branch, and the extracted class name, the system constructs the Git file path ( file_path) to locate the exact source file.

Identify the commit author – Combining the repository ID, file_path, line number, and authentication data, the system queries Git to find the commit that introduced the specific line, thereby determining the responsible developer.

These steps are configurable, allowing control over how many stack frames are examined before a valid result is found.

Result and Distribution

Every week, the system automatically distributes precise bug tickets to the identified developers, filtering out noise by configurable log‑type rules. Two statistical reports—one by application and one by developer—track remediation progress, ensuring that most exceptions are resolved before reaching production.

Conclusion

The automated pipeline dramatically reduces manual effort, improves bug‑fix turnaround, and aims to eliminate all pre‑release exceptions before they can affect live services.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Exception HandlingGitlog analysisbug tracking
dbaplus Community
Written by

dbaplus Community

Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.