mcpField
D
distributed-tracing

distributed-tracing

github.com/wshobsonCloud & DevOps41.9k10.9k installsUpdated 2w ago
Repository

About distributed-tracing

A skill for instrumenting microservices with Jaeger and Tempo to follow requests and investigate latency, dependencies, and failures. It is for teams operating distributed systems, with guidance on sampling, context propagation, and correlating logs.

Key features

  1. 01Jaeger and Tempo tracing guidance
  2. 02Latency and dependency analysis
  3. 03Sampling and context propagation
  4. 04Trace and log correlation
  5. 05Troubleshooting trace overhead

Use cases

  1. 01Investigating slow requests
  2. 02Mapping service dependencies
  3. 03Finding bottlenecks and error paths

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/wshobson/agents --skill distributed-tracing

After installing, type/distributed-tracingin Claude Code to confirm it loaded.

Bundled filesreferences/details.md

Details

From the project README

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

Comments

Markdown supported