Introducing Bistoury: An Open‑Source Java Application Diagnostic Tool
This article introduces Bistoury, an open‑source, non‑intrusive Java application diagnostic platform that combines Arthas and vjtools to provide online debugging, thread‑level CPU monitoring, and a graphical interface for efficient backend troubleshooting without requiring code changes or machine login.
Author : Nie Zhenyu, who joined Qunar's tech team in 2013 and works in the infrastructure department, focusing on concurrent programming and high‑concurrency systems.
Introduction
Recently we open‑sourced Bistoury, an internal Java application diagnostic tool at Qunar, and this article explains what Bistoury is, why it was created, and what it can do.
What is Bistoury
Bistoury is a transparent, non‑intrusive Java application diagnostic tool released by Qunar.
Its goal is to provide a one‑stop Java diagnostic solution, allowing developers to inspect logs, memory, threads, class information, debugging data, machine and system properties without logging into machines or modifying the system, thereby improving diagnostic efficiency and capability.
Why Bistoury Was Created
Bistoury builds on Qunar's internal agent and integrates Alibaba’s open‑source Arthas and Vipshop’s open‑source vjtools.
Although Arthas and vjtools are excellent, Bistoury adds targeted optimizations and features that greatly enhance developers' diagnostic abilities.
What Bistoury Can Do
We provide powerful diagnostic functions; the following sections briefly introduce online debugging, thread‑level CPU monitoring, and some optimizations.
Online Debug
Traditional debugging often involves adding logs repeatedly, which is time‑consuming and ineffective. Bistoury implements online debugging that mimics IDE debugging: you can set breakpoints (including conditional ones) directly on code, capture various runtime information at the breakpoint, and continue execution without pausing the whole system.
Online debug offers IDE‑like functionality: view local, member, static variables and call stacks at a breakpoint.
Remote debugging requires starting the JVM with debug parameters and may pause the entire application; online debug works without any JVM changes.
Remote debugging halts the whole system, potentially causing failures, whereas online debug only captures a snapshot and lets the program continue.
After using it, you’ll find it provides exactly the debugging experience you need.
Thread‑level CPU Monitoring
In daily operations, sudden CPU spikes often require logging into machines, using top , identifying the offending thread, and then analyzing it with jstack , which can be time‑consuming and may miss the issue if it disappears.
Bistoury offers thread‑level CPU usage monitoring, storing three days of per‑thread data, allowing you to view per‑minute CPU usage and instant thread call stacks by thread name.
Some Optimizations
While Arthas and vjtools are command‑line tools with high efficiency, graphical interfaces simplify complex parameter usage. Bistoury retains the CLI while providing a GUI for many commands.
Arthas and vjtools diagnose from a single‑machine perspective; Bistoury integrates with an application center to provide a multi‑machine, application‑level view.
Arthas and vjtools require manual IP/port configuration or machine login; Bistoury removes these steps, offering a unified web entry where you select the application and machine from the page.
Quick Start
If you face a hard‑to‑track online issue, try Bistoury’s quick‑deployment script to start the service within a minute and begin inserting breakpoints for debugging.
Project Details
GitHub repository: https://github.com/qunarcorp/bistoury
If you find it useful, consider starring the project on GitHub.
Qunar Tech Salon
Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.