OSS TanbouSign in with GitHub

Record Ruby operations as spans while choosing export separately

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
610
Primary language
Ruby
License
Apache-2.0
Repository last updated
Oct 5, 2026
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

Record operations and attributes through the Ruby API

A Tracer starts spans and records operation names, attributes, and errors. Combining SDK processing with ConsoleSpanExporter exposes generated data without an external Collector.

Sources: [1][3]

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

Check Ruby compatibility and pending-data handling

SDK v1.13.1 requires Ruby 3.3 or later. Shut down the provider, keep secrets out of attributes, and choose production export and sampling deliberately.

Sources: [1][4][2]

Official sources

  1. [1]OpenTelemetry Ruby README at opentelemetry-sdk/v1.13.1(2026-10-05)
  2. [2]SDK gemspec at v1.13.1(2026-10-05)
  3. [3]ConsoleSpanExporter at v1.13.1(2026-10-05)
  4. [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. 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. 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. 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
Check the official README

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

Jul 8Oct 5
Issues openedIssues closed

Pull requests

162 / 130

Jul 8Oct 5
PRs openedPRs merged

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

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
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?