Basic Usage
This guide covers essential operations for using DeepTrace after completing the initial setup. It focuses on day-to-day operations and advanced usage patterns.
Prerequisites: Complete the Quick Start Guide before using this guide.
Core Workflow
DeepTrace follows a simple workflow for distributed tracing:
1. Agent Collection → 2. Span Correlation → 3. Trace Assembly → 4. Analysis
Advanced Agent Operations
Agent Status Management
# Check agent status
sudo docker exec -it deeptrace_server python -m cli.src.cmd agent status
# Restart agent with new configuration
sudo docker exec -it deeptrace_server python -m cli.src.cmd agent restart
# View agent logs
sudo docker exec -it deeptrace_server python -m cli.src.cmd agent logs
Span Correlation
Available Algorithms
| Algorithm | Description | Use Case |
|---|---|---|
deeptrace | Advanced transaction-based correlation | Recommended for most scenarios |
fifo | Simple first-in-first-out correlation | Testing and simple applications |
Run Correlation
# Use DeepTrace algorithm (recommended)
sudo docker exec -it deeptrace_server python -m cli.src.cmd asso algo deeptrace
# Alternative: Use FIFO algorithm
sudo docker exec -it deeptrace_server python -m cli.src.cmd asso algo fifo
Trace Assembly
After correlation, assemble traces from correlated spans:
# Assemble traces
sudo docker exec -it deeptrace_server python -m cli.src.cmd assemble
Advanced Data Analysis
For basic trace viewing, see the Quick Start Guide. This section covers advanced analysis techniques.
Advanced Kibana Operations
# Create custom index patterns
# Set up advanced visualizations
# Configure dashboards for monitoring
For detailed analysis techniques, see Trace Analysis.
System Monitoring
Health Checks
# Check Elasticsearch cluster health
curl http://localhost:9200/_cluster/health
# Monitor container resource usage
sudo docker stats
# Verify DeepTrace containers
sudo docker ps | grep deeptrace
Data Management
# Clear all collected data
sudo docker exec -it deeptrace_server python -m cli.src.cmd db clear
# Delete specific Elasticsearch index
curl -X DELETE "localhost:9200/traces"
Troubleshooting
No Traces Collected
Common causes and solutions:
- Agent not running: Verify agent status and restart if needed
- No traffic: Ensure microservice applications are receiving requests
- Network issues: Check connectivity between agent and server
- Elasticsearch issues: Verify Elasticsearch is accessible and healthy
Poor Correlation Results
Optimization strategies:
- Try different algorithms: Switch between
deeptraceandfifo - Increase data collection: Ensure sufficient spans before correlation
- Check application traffic: Verify microservices are generating network activity
- Review configuration: Ensure proper agent and server configuration
Cleanup
Remove DeepTrace
To completely remove DeepTrace and all components:
sudo bash scripts/clear.sh
This will:
- Stop all containers
- Remove Docker images
- Clean up temporary files
- Reset the environment
Next Steps
- Web UI: Explore the web-based monitoring interface
- Database Setup: Advanced Elasticsearch configuration
- Workload Applications: Deploy additional test applications
- Configuration Guide: Advanced configuration options