distributed-tracing

Trace requests across microservices using OpenTelemetry with Jaeger and Tempo.

1|Updated Aug 31, 2024
One-click install
npx skills add https://github.com/aRustyDev/dotfiles --skill distributed-tracing-arustydev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-tracing
Source: https://github.com/aRustyDev/dotfiles/tree/main/.ai/plugins/observability-monitoring/skills/distributed-tracing
Command: npx skills add https://github.com/aRustyDev/dotfiles --skill distributed-tracing-arustydev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opentelemetry-sdk, opentelemetry-exporter-jaeger, opentelemetry-instrumentation-flask, flask, requests, and includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables you to implement distributed tracing with tools like Jaeger and Tempo, providing end-to-end visibility into request flows across microservices to identify performance bottlenecks and debug issues.

Core Features & Use Cases

  • Trace & Span Instrumentation: Guides on using OpenTelemetry to instrument applications in Python, Node.js, and Go.
  • Context Propagation: Ensures trace context is correctly passed between services via HTTP headers.
  • Jaeger & Tempo Setup: Provides deployment instructions for Jaeger (for collection/UI) and Tempo (for long-term storage).
  • Trace Analysis: Helps in querying traces to find slow requests, errors, and visualize service dependencies.
  • Use Case: Debug a high-latency API request in a microservices architecture by tracing its path through multiple services, identifying which service or database call is causing the delay.

Quick Start

Outline the key components of a distributed trace (Trace, Span, Context, Tags, Logs).

Frequently Asked Questions about distributed-tracing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace requests across microservices to find performance bottlenecks?

Distributed tracing with OpenTelemetry instruments your services to track requests end-to-end, creating traces and spans that show which service or component causes latency. Use Jaeger or Tempo to visualize these traces and identify slow operations across your microservices architecture.

What's the difference between Jaeger and Tempo for distributed tracing?

Jaeger provides real-time trace collection and a UI for immediate query and analysis. Tempo is designed for long-term trace storage and cost efficiency at scale. Both work with OpenTelemetry; choose Jaeger for operational debugging and Tempo for archived trace retention.

How do I set up OpenTelemetry instrumentation across Python, Node.js, and Go services?

OpenTelemetry SDKs and language-specific instrumentation packages (like opentelemetry-instrumentation-flask for Python) capture traces and spans from your applications. Configure exporters to send data to Jaeger or Tempo, then enable auto-instrumentation to trace requests without modifying application code.

Do I need to manually propagate trace context between services?

OpenTelemetry handles context propagation automatically via HTTP headers when properly configured. Ensure your services use OpenTelemetry middleware and instrumentation; context flows through request/response cycles across Flask, Express, and other frameworks without manual intervention.

Can I use distributed tracing to debug error propagation across services?

Yes. Distributed tracing captures error context, logs, and attributes at each span, showing exactly where failures occur and how errors propagate through your service chain. Jaeger and Tempo let you query and visualize these error traces to pinpoint root causes.

What prerequisites do I need before implementing distributed tracing?

You need OpenTelemetry SDK for your language, exporter libraries (Jaeger or Tempo), instrumentation packages for your frameworks (Flask, Express, etc.), and deployed Jaeger or Tempo backend. Basic understanding of microservice architecture and HTTP context propagation is helpful.