distributed-tracing – skill DevOps & Hạ tầng cho agent AI
Triển khai distributed tracing với Jaeger và Tempo để theo dõi request qua các microservice và tìm nút thắt hiệu năng. Dùng khi gỡ lỗi microservice, phân tích luồng request hoặc triển khai observability cho hệ thống phân tán.
Cài skill distributed-tracing bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/distributed-tracing-21f5a.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /distributed-tracing – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/distributed-tracing-21f5a.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $distributed-tracing – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/distributed-tracing-21f5a.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /distributed-tracing – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/distributed-tracing-21f5a.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /distributed-tracing – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Distributed Tracing
Implement distributed tracing with Jaeger and Tempo for request flow visibility across microservices.
Purpose
Track requests across distributed systems to understand latency, dependencies, and failure points.
When to Use
- Debug latency issues
- Understand service dependencies
- Identify bottlenecks
- Trace error propagation
- Analyze request paths
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
1. Sample appropriately (1-10% in production)
2. Add meaningful tags (user_id, request_id)
3. Propagate context across all service boundaries
4. Log exceptions in spans
5. Use consistent naming for operations
6. Monitor tracing overhead (<1% CPU impact)
7. Set up alerts for trace errors
8. Implement distributed context (baggage)
9. Use span events for important milestones
10. Document instrumentation standards
Integration with Logging
Correlated Logs
import logging
from opentelemetry import trace
logger = logging.getLogger(__name__)
def process_request():
span = trace.get_current_span()
trace_id = span.get_span_context().trace_id
logger.info(
"Processing request",
extra={"trace_id": format(trace_id, '032x')}
)Troubleshooting
No traces appearing:
- Check collector endpoint
- Verify network connectivity
- Check sampling configuration
- Review application logs
High latency overhead:
- Reduce sampling rate
- Use batch span processor
- Check exporter configuration
Related Skills
prometheus-configuration- For metricsgrafana-dashboards- For visualizationslo-implementation- For latency SLOs
Skill liên quan
- competitor-news-monitor – Theo dõi các công ty được chỉ định để nắm tin tức quan trọng; tổng hợp bản tin có trích…
- hunt-cloud-misconfig – Săn tìm cấu hình sai trên cloud và hạ tầng. AWS: S3 bucket công khai (s3:GetObject ẩn…
- apify-actor-development – Tạo, chỉnh sửa và kiểm tra Apify Actor với input có phạm vi, schema lưu trữ, logic…
- apify-actorization – Actorization chuyển phần mềm có sẵn thành ứng dụng serverless có thể tái sử dụng, tương…
- appdeploy – Triển khai ứng dụng web có API backend, cơ sở dữ liệu và lưu trữ tệp. Dùng khi người…
- render-deploy – Triển khai ứng dụng lên Render bằng cách phân tích codebase, tạo Blueprint render.yaml…
- docker-management – Quản lý container, image, volume và Compose trong Docker.
- apple-container – Xây dựng, chạy và quản lý container OCI/Linux dưới dạng máy ảo nhẹ riêng cho từng…