otel-ruby

Configure OpenTelemetry SDK and OTLP exporter for Ruby services.

2|Updated May 28, 2026
One-click install
npx skills add https://github.com/tsuga-dev/agent-plugins --skill otel-ruby
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: otel-ruby
Source: https://github.com/tsuga-dev/agent-plugins/tree/main/plugins/telemetry/skills/otel-ruby
Command: npx skills add https://github.com/tsuga-dev/agent-plugins --skill otel-ruby

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill fixes and improves OpenTelemetry (OTel) setup for Ruby services so traces, metrics, logs, and resource attributes are correctly configured and exported.

Core Features & Use Cases

  • OTel Ruby instrumentation guidance: Covers configuring the Ruby SDK, OTLP exporter, and auto-instrumentation setup for Rails, Sinatra, Rack, Sidekiq, and plain Ruby.
  • Protocol-accurate OTLP exporting: Ensures correct Ruby OTLP behavior (HTTP/protobuf on port 4318) and avoids common misconfigurations.
  • Async messaging correctness: Provides Ruby-specific span-link patterns for Kafka and Sidekiq so traces connect without incorrect parent-child relationships.
  • Operational guardrails: Enforces a mutation gate for code changes and directs verification via Tsuga smoke tests.

Quick Start

Use the otel-ruby skill when you need to update OpenTelemetry SDK setup in a Ruby codebase, then ask it to produce the exact Ruby changes (with a diff) and to proceed only after you confirm.

Frequently Asked Questions about otel-ruby

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

FAQPage Schema
How do I configure OpenTelemetry Ruby SDK to export traces to a collector?

Configure the OpenTelemetry Ruby SDK by setting up the OTLP HTTP exporter to send protobuf payloads to port 4318. This ensures traces, metrics, and logs are correctly exported from your Ruby application to the collector.

Why are my Sidekiq background jobs not showing up in OpenTelemetry traces?

Sidekiq tracing requires correct span-link patterns to connect traces without incorrect parent-child relationships. OpenTelemetry Ruby instrumentation needs specific async messaging configuration to ensure background job spans link properly.

What is the correct initialization order for OpenTelemetry auto-instrumentation in Rails?

OpenTelemetry Rails auto-instrumentation requires correct initialization order during SDK setup to ensure all Rack and Rails instrumentation loads properly. Establishing the right sequence prevents signals from failing to reach the collector.

Does the Ruby OTLP exporter support gRPC or only HTTP/protobuf on port 4318?

The Ruby OTLP exporter uses HTTP/protobuf on port 4318 for protocol-accurate exporting. This avoids common misconfigurations that occur when attempting to use incompatible transport protocols for OpenTelemetry signal export.

How do I add resource attributes to my Ruby OpenTelemetry spans?

Adding resource attributes in OpenTelemetry Ruby involves configuring the SDK resource object during initialization. This ensures your traces, metrics, and logs carry correct service-level metadata before being exported via OTLP.

Can I use OpenTelemetry instrumentation with a plain Ruby application without Rails?

OpenTelemetry Ruby instrumentation supports plain Ruby, Sinatra, Rack, and Sidekiq in addition to Rails. The SDK configuration and OTLP exporter setup apply across all these contexts to ensure signals are correctly exported.