可帮助开发者迅速获取指定业务流程调用链的运行日志,定位跨设备/跨进程/跨线程的故障问题。基于云计算分布式调用链思想轻量级实现,在通信中传递 traceid,在进程 Native 层 TLS 存储 traceid,在事件和运行日志中自动附加 traceid。【此简介由AI生成】
| Files | Last commit | Last update |
|---|---|---|
| 6 months ago | ||
| 6 months ago | ||
| 9 months ago | ||
| 6 months ago | ||
| 1 year ago | ||
| 5 years ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 7 months ago | ||
| 6 months ago | ||
| 1 year ago | ||
| 1 year ago | ||
| 2 years ago | ||
| 10 months ago | ||
| 10 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 9 months ago |
HiTrace
Overview
HiTrace provides APIs to implement call chain tracing throughout a service process. With HiTrace, you can quickly obtain the run log for the call chain of a specified service process and locate faults in cross-device, cross-process, or cross-thread communications.
Architecture
Figure 1 Architecture of HiTrace

HiTrace is the lightweight implementation based on the distributed call chain of cloud computing. HiTrace implements call chain tracing as follows:
- Transfers traceid in cross-device, cross-process, and cross-thread communications.
- Stores traceid in the thread local storage (TLS) at the Native layer of the process.
- Automatically adds traceid to existing events and run logs.
Directory Structure
/base/hiviewdfx/hitrace
├── frameworks # Framework code
│ └── native # HiTrace Native implementation code
├── interfaces # APIs
│ └── js # JS APIs
│ └── kits # JS inner implementation code
│ └── native # C/C++ APIs
│ └── innerkits # Header files opened to internal subsystems
└── test # Test cases
Constraints
HiTrace is already supported by the IPC and EventHandler communication mechanisms. If you are using a custom communication mechanism, adaptation is required to use HiTrace.
For hitrace --boot_trace / hitrace boot-trace end-to-end behavior and CLI parameters, see docs/hitrace_cmd/boot-trace.md (kept in sync with cmd/hitrace_cmd.cpp and startup_init).
Usage
Available APIs
Major APIs of HiTrace
Repositories Involved
Introduction
可帮助开发者迅速获取指定业务流程调用链的运行日志,定位跨设备/跨进程/跨线程的故障问题。基于云计算分布式调用链思想轻量级实现,在通信中传递 traceid,在进程 Native 层 TLS 存储 traceid,在事件和运行日志中自动附加 traceid。【此简介由AI生成】
Customize your domain