On this page
Overview
OpenTelemetry Ruby provides APIs and an SDK for producing traces and metrics from Ruby code. Instrumentation stays separate from export, so teams can inspect data in the console before connecting a collector.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Best fit
Fit explicit instrumentation in Ruby services
It suits important business operations in Ruby services and custom work that complements automatic instrumentation for frameworks such as Rails.
Sources: [1]
Before adoption
Official sources
- [1]OpenTelemetry Ruby README at opentelemetry-sdk/v1.13.1(2026-10-05)
- [2]SDK gemspec at v1.13.1(2026-10-05)
- [3]ConsoleSpanExporter at v1.13.1(2026-10-05)
- [4]Ruby LICENSE at the fixed tag(2026-10-05)
Supplemental curator note
Inspect the checkout span and cart.items attribute in the console first, then instrument only useful business boundaries before configuring production export.
Try it in 3 steps
- 1
Install the pinned SDK locally
Use Ruby 3.3 or later and RubyGems to install SDK v1.13.1 into an empty working directory. Downloading the gem requires network access.
mkdir otel-ruby-demo && cd otel-ruby-demo && GEM_HOME="$PWD/vendor/gems" GEM_PATH="$PWD/vendor/gems" gem install --no-document opentelemetry-sdk -v 1.13.1 - 2
Create a checkout span
Create a short Ruby file using the pinned TracerProvider, SimpleSpanProcessor, and ConsoleSpanExporter APIs, with a cart.items attribute on checkout.
cat > trace_demo.rb <<'RUBY' require 'opentelemetry/sdk' provider = OpenTelemetry::SDK::Trace::TracerProvider.new exporter = OpenTelemetry::SDK::Trace::Export::ConsoleSpanExporter.new provider.add_span_processor(OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(exporter)) tracer = provider.tracer(name: 'oss-tanbou-demo') tracer.in_span('checkout') { |span| span.set_attribute('cart.items', 2) } provider.shutdown RUBY - 3
Verify console output
Run the script, save output in ruby-span.txt, and require both the checkout operation name and cart.items attribute.
(set -o pipefail; GEM_HOME="$PWD/vendor/gems" GEM_PATH="$PWD/vendor/gems" ruby trace_demo.rb | tee ruby-span.txt) && grep -F 'checkout' ruby-span.txt && grep -F 'cart.items' ruby-span.txt
Growth
Growth trends · Last 30 days
610 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 46
- Open PRs
- 43
- Issues opened
- 52
- Issues closed
- 21
- PRs opened
- 162
- PRs merged
- 130
Issues
52 / 21
Pull requests
162 / 130
Maintenance
- Median first response
- 3 min
- Issue response rate
- 2% (1/50)
Based on up to the 100 newest issues opened by external users in the last 90 days. A first comment from an OWNER, MEMBER, or COLLABORATOR counts as a response; issues whose full comment history cannot be checked are excluded. The median and response rate update weekly.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- telemetry
- distributed-tracing
- metrics
- opentelemetry
- opentelemetry-ruby
- opentelemetry-api
- hacktoberfest
- Stars
- 610
- Forks
- 302
- Watchers
- 22
- Open issues
- 94
- Contributors
- 145
- Owner type
- Organization
- Primary language
- Ruby
- License
- Apache-2.0
- Repository last updated
- Oct 5, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Homebrew49,894 Stars
1 shared tag(s) · 1 shared category(s) · Same language
manage macOS and Linux software through the
Rubybrewpackage workflow - fastlane42,200 Stars
1 shared tag(s) · 1 shared category(s) · Same language
automate repeatable iOS and Android build, signing, screenshot, and store-release workflows as lanes
Ruby - Vagrant27,211 Stars
1 shared tag(s) · 1 shared category(s) · Same language
define portable development environments across providers with a Vagrantfile
Ruby - Kamal14,632 Stars
1 shared tag(s) · 1 shared category(s) · Same language
deploy Dockerized web apps to bare metal or cloud VMs over SSH and switch traffic with kamal-proxy for zero-downtime releases
Ruby - Fluentd13,597 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Connect sources, filters, buffers, and outputs through plugins in one log and event-delivery pipeline
Ruby - RuboCop12,910 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Check Ruby code for style violations and likely bugs, with optional corrections
Ruby
Report incorrect information
Tell us if any listing information is incorrect or outdated.