distributed-tracing-rails

Configure OpenTelemetry distributed tracing for Rails microservices with W3C trace context propagation.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill distributed-tracing-rails
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: distributed-tracing-rails
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/48-distributed-tracing-rails
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill distributed-tracing-rails

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging requests across multiple Rails microservices is extremely difficult using only logs, as related events are scattered across separate services and lack a unified view. This Skill eliminates that friction by providing production-ready instructions to implement vendor-neutral distributed tracing that follows requests end-to-end.

Core Features & Use Cases

  • OpenTelemetry Auto-Instrumentation: Automatically instruments Rails controllers, Active Record, Sidekiq, Kafka, and outbound HTTP calls with zero custom code for common frameworks.
  • Cross-Service Context Propagation: Uses W3C traceparent headers to maintain trace continuity across HTTP, Sidekiq job queues, and Kafka topics without manual wiring.
  • Configurable Sampling & Export: Supports parent-based trace sampling, tail-based sampling for errors and slow traces, and OTLP export to all major observability backends including Tempo, Jaeger, Honeycomb, and Datadog.
  • Trace-Log Correlation: Includes setup to inject trace_id into every Rails log line, so you can jump from a trace directly to all related logs across services.
  • Use Case: For a Rails ecommerce platform with separate order, payment, and notification services, use this Skill to trace a single checkout request across all three services to identify latency bottlenecks in the payment processing step.

Quick Start

Use the distributed-tracing-rails skill to configure OpenTelemetry tracing for your Rails application with auto-instrumentation and cross-service request visibility.

Frequently Asked Questions about distributed-tracing-rails

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

FAQPage Schema
How do I trace a single request across multiple Rails microservices?▼

You can trace cross-service requests in Rails microservices by implementing OpenTelemetry auto-instrumentation with W3C trace context propagation. This provides end-to-end visibility across HTTP, Sidekiq, and Kafka boundaries to identify latency bottlenecks.

How does OpenTelemetry trace context propagation work with Sidekiq and Kafka in Rails?▼

OpenTelemetry trace context propagation uses W3C traceparent headers to maintain trace continuity across Sidekiq job queues and Kafka topics. This automatic wiring ensures a unified trace view without manual code changes for common frameworks.

Can I export Rails OpenTelemetry traces to Datadog, Jaeger, or Honeycomb?▼

Yes, you can export Rails OpenTelemetry traces to Datadog, Jaeger, Honeycomb, and Tempo. The implementation uses vendor-neutral OTLP export, allowing you to send telemetry data to all major observability backends.

What is the best way to correlate Rails application logs with distributed traces?▼

The best way to correlate Rails logs with distributed traces is by injecting the OpenTelemetry trace_id into every log line. This allows you to jump directly from a trace view to all related logs across separate services.

How do I configure trace sampling for errors and slow requests in Rails?▼

You can configure trace sampling in Rails by using parent-based trace sampling and tail-based sampling. This approach specifically captures errors and slow traces, reducing telemetry volume while retaining critical performance data.