Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)41k · #6740

distributed-tracing

Skill này làm gì

Công cụ này giúp hiểu cách các yêu cầu đi qua các phần khác nhau của hệ thống máy tính. Điều này hữu ích để tìm nguyên nhân làm chậm hiệu năng hoặc gây lỗi.

Khi nào nên dùng

  • ✓Khi có điều gì đó chậm.
  • ✓Khi bạn muốn xem các dịch vụ giao tiếp với nhau như thế nào.
  • ✓Khi bạn cần tìm nơi xảy ra lỗi.

Liên kết skill

https://github.com/wshobson/agents/blob/main/plugins/observability-monitoring/skills/distributed-tracing/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/wshobson/agents/blob/main/plugins/observability-monitoring/skills/distributed-tracing/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giúp tôi theo dõi một yêu cầu đang mất quá nhiều thời gian để xử lý.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ thêm các thông tin nhỏ ở mỗi bước mà yêu cầu đi qua. Những thông tin này được gửi đến một nơi để chúng ta có thể thấy toàn bộ hành trình của yêu cầu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết 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 metrics
  • grafana-dashboards - For visualization
  • slo-implementation - For latency SLOs
Câu hỏi thường gặp

“Microservices” là gì?

Đó là các phần nhỏ, độc lập của một chương trình lớn hơn, giao tiếp với nhau.

“Jaeger” hoặc “Tempo” là gì?

Đây là các công cụ thu thập và hiển thị thông tin theo dõi để chúng ta có thể trực quan hóa.

Tại sao phải “lấy mẫu” (sample) các trace?

Để tránh làm hệ thống quá tải với thông tin, đặc biệt trong các hệ thống lớn có nhiều yêu cầu.

Chi tiết

Mô tả gốc của tác giả

Implement distributed tracing with Jaeger and Tempo to track requests across microservices and identify performance bottlenecks. Use when debugging microservices, analyzing request flows, or implementing observability for distributed systems.

repo: wshobson/agents

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6740
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự