Current Version: v1.1.4
FuncTrace Analyzer is a professional Go function tracing analysis tool that helps developers deeply understand function call relationships and performance bottlenecks through visualization technologies. The system uses the Kratos microservices framework for the backend and Vue.js for the frontend, providing a complete solution from data collection to 3D visualization.
- Intelligent Function Tracing - Real-time goroutine execution path capture
- Multi-dime 8000 nsional Analysis - Time dimension, call depth, resource consumption analysis
- Interactive Visualization - Dynamic zoomable Mermaid flowcharts + parameter heatmaps
- Smart Diagnostics - Performance bottleneck prediction based on historical data
- Cross-platform Support - Lightweight SQLite storage solution
- Low-overhead Monitoring - Under 5% performance overhead
- Zero-Intrusive Integration - No code modification required
- Millisecond Response - Fast query for 10M+ call chains
Domain | Technologies |
---|---|
Backend | Kratos (Microservices) |
Frontend | Vue3 + Composition API |
Visualization | Mermaid.js + ECharts |
Storage | SQLite + WAL Mode + Ent |
Search | fuse.js fuzzy search |
Deployment | Docker + Kubernetes-ready |
├── api # API definitions (protobuf)
├── cmd # Main applications
├── configs # Configuration files
├── internal # Private application code
│ ├── biz # Business logic
│ ├── data # Data processing and storage (Ent)
│ ├── server # Server implementations
│ └── service # Service implementations
├── third_party # Third party dependencies
└── README.md # This file
- Description: Search and display goroutines related to specific functions
- Component:
TraceViewer.vue
- Details:
- Dynamic filtering with input and dropdown
- API integration for GID retrieval
- Fuzzy search using
fuse.js
- Description: Detailed trace analysis for specific GIDs
- Component:
TraceDetails.vue
- Details:
- Parameter inspection capabilities
- Interactive timeline navigation
- Description: Visualize function call relationships
- Component:
MermaidViewer.vue
- Details:
- Mermaid.js rendering
- Zoom/drag support
- Description: SQLite data storage/query using Ent
- Details:
- Type-safe database operations
- CRUD operations for trace data
- Description: Cross-origin resource sharing
- Details: CORS middleware configuration
- Go 1.19+
- Node.js 16+
- SQLite3 3.36+
# Clone repository
git clone https://github.com/toheart/goanalysis.git
# start server
go run . server
# Instrumentation
go run . rewrite -d <path-to>
Endpoint | Method | Description |
---|---|---|
/api/gids |
GET | Get all GIDs |
/api/functions |
GET | List all functions |
/api/gids/function |
POST | Find GIDs by function |
/api/traces/{gid} |
GET | Get trace by GID |
/api/params/{id} |
GET | Get parameters by ID |
/api/traces/{gid}/mermaid |
GET | Get Mermaid diagram data |
We follow Gitflow workflow:
- Create feature branch:
git checkout -b feature/your-feature
- Commit atomic changes (follow Conventional Commits)
- Write unit tests (≥80% coverage)
- Update documentation
- Create PR to
develop
branch
- Service Discovery: Built-in service registry and discovery
- Error Handling: Structured error handling and recovery
- Logging & Tracing: Comprehensive logging and distributed tracing
- Project Structure: Following Kratos recommended conventions
This project has configured a GitHub Actions pipeline for automatically building and publishing Docker images and packages.
When code is pushed to the main
branch or a new tag (in the format of v*
, such as v1.0.0
) is created, the build process is automatically triggered:
- Checkout code
- Set up Go environment
- Retrieve version information
- Sync frontend code (from the latest release version of https://github.com/toheart/goanalysis-web)
- Build application
- Package Linux and Windows versions
- Build and push Docker image (only when pushing to a branch or tag)
- Create GitHub Release (only when creating a tag)
The system will automatically fetch the latest release version from the https://github.com/toheart/goanalysis-web repository for building:
- Retrieve the latest release version information via GitHub API
- Download the corresponding release package or source code
- If the release package contains a compiled dist directory, use it directly
- If only the source code is available, it will be compiled automatically
- The Release notes will include the frontend version information used
Version | Date | Milestone |
---|---|---|
v1.0.0 | 2025-03-09 | Official release |
v0.9.0 | 2025-02-25 | Distributed tracing support |
v0.8.0 | 2025-02-18 | Parameter heatmap analysis |
- Maintainer: toheart
- Issues: GitHub Issues
- WeChat: 小唐的技术日志
FuncTrace Analyzer - Powered by Kratos+Vue Tech Stack
📌 Last Updated: 2025-03-09 CST