otel-ruby

Ruby init-only opentelemetry-sdk1.12.0

attach require 'opentelemetry/sdk'; OpenTelemetry::SDK.configure { use_all }

24/64 cells pass
  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

Not compared with the uninstrumented Ruby relay (no run on this site measured it on ruby 3.3.13).

Explanations

OpenTelemetry carries the OpenTracing-era ot-baggage-* headers only with the opt-in ottrace propagator

config ot-baggage-* is a legacy OpenTracing convention. OpenTelemetry's default propagators are tracecontext and baggage; the OT Trace propagator that carries ot-baggage-* has to be selected.

The seeded ot-baggage-routing-key header is neither extracted nor re-emitted by any OpenTelemetry variant on any delivered boundary. Every variant here runs the SDK's default propagator set, tracecontext,baggage, and that set does not include the OpenTracing header format: OpenTelemetry standardised on W3C baggage, and the same values travel there instead.

The OpenTelemetry specification does list an opt-in OT Trace propagator (OTEL_PROPAGATORS=ottrace, marked deprecated) that reads and writes ot-tracer-traceid, ot-tracer-spanid, ot-tracer-sampled and ot-baggage-*, for applications migrating from OpenTracing. Several SDKs ship it as a separate package; it is never in the default set, and the harness has not measured it, so whether it makes these cells pass is documented, not verified.

The header outlives its deprecation only in Datadog's Java, Node and Go tracers, where it crosses all 16 boundaries as legacy behaviour of the datadog style (see datadog-ot-baggage-not-implemented for the Datadog tracers that do not carry it).

16 cells affected

otel-ot-baggage-not-default

OTel Ruby: bunny consumer drops the producer context and starts a new trace

open opentelemetry-instrumentation-bunny parents the process span on its own re-injected local headers and demotes the producer context to a span link.

Injection into RabbitMQ (*->rabbitmq) via opentelemetry-instrumentation-bunny 0.25.0 is correct, baggage included. On consume, with_process_span in patch_helpers.rb parents the process span on the instrumentation's own :tracer_receive_headers (a local receive span it injected itself) and adds the producer's real context only as a Link. Every rabbitmq->* leg starts a new trace and loses baggage and the foreign tracestate entry.

Exact-match issue #526 ("Instead of propagating any contexts (including baggage), the bunny instrumentation drops all contexts in the consumer and starts a new trace") has been open since June 2023 with no fix PR. Maintainers describe the behaviour as links-by-design per the OTel messaging spec (discussion #1098).

Workaround: extract from the delivery headers and attach the context in the consumer block before outbound calls. This is the same consume-side activation gap seen in OTel Python (confluent-kafka) and OTel .NET (Kafka).

12 cells affected

otel-ruby-bunny-consume-new-trace

OTel Ruby: the gRPC instrumentation is client-only, so gRPC-inbound requests start a new trace

open opentelemetry-instrumentation-grpc only instruments outbound calls; there is no server-side instrumentation for the plain grpc gem.

The contrib gRPC instrumentation (donated from hibachrach/opentelemetry-instrumentation-grpc via PR #1164, Sep 2024, answering a request open since 2020) is client-only: its README warns "Right now, the gem only instruments outbound requests to gRPC services". It is bundled in opentelemetry-instrumentation-all, so it is loaded but client-only, and even client injection requires manually wiring the interceptor into stubs. Server spans exist only for the Gruf framework.

With no server-side extraction, grpc->* legs run with no incoming context; outbound calls start a fresh trace and baggage/tracestate are lost.

Workaround: add a server interceptor that extracts from the call metadata and attaches the context. We found no upstream issue requesting server-side grpc gem support.

12 cells affected

otel-ruby-grpc-server-not-instrumented

Versions measured

Tracer
opentelemetry-sdk 1.12.0 1.12.0 on rubygems github
Runtime
ruby 3.3.13
Setup tier
init-only A boot-file initializer loads and configures the tool before application code runs (Ruby's require+configure pattern, Elastic Python's middleware). Request-path code is untouched.
Attach
require 'opentelemetry/sdk'; OpenTelemetry::SDK.configure { use_all }
Relay source
relays/ruby/gemfiles/otel
Ran at
1 Nov 2026, 03:49 UTC
Harness
e793604 · measured in backtest-otel-ruby-1.12.0
Raw JSON
1.12.0.json → variants[id = "otel-ruby"]

Libraries

grpcgrpc 1.83.1
http-clientnet/http (stdlib)
http-serversinatra 4.2.1 (puma 8.0.2)
kafkardkafka 0.29.1
rabbitmqbunny 3.3.0

Configuration

OTEL_PROPAGATORStracecontext,baggage
OTEL_TRACES_EXPORTERnone

Evidence per hop

What the driver seeded and what the sink observed, one entry per boundary.

HTTP HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound HTTP request headers

baggage routing-key=rk-121c1aea,team=alpha
ot-baggage-routing-key rk-121c1aea
traceparent 00-fee9317db586c6ce6ea490591ac9b4ff-7d57126b42de1d4a-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--955be487

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip;q=1.0,deflate;q=0.6,identity;q=0.3
baggage routing-key=rk-121c1aea,team=alpha
content-length 44
content-type application/json
traceparent 00-fee9317db586c6ce6ea490591ac9b4ff-b49c0a2aee01c54e-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--955be487
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound HTTP request headers

baggage routing-key=rk-855ba9dd,team=alpha
ot-baggage-routing-key rk-855ba9dd
traceparent 00-547622f914298d119c27a14ed0ad8faa-f0f9ada908afc2f1-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--721d11c7

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-855ba9dd,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-547622f914298d119c27a14ed0ad8faa-ec9034fec78955a8-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--721d11c7
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound HTTP request headers

baggage routing-key=rk-a2bc877d,team=alpha
ot-baggage-routing-key rk-a2bc877d
traceparent 00-1c1f4b30a3316df30c2531c0ba00f06b-206dd51220952550-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--89014d7f

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-a2bc877d,team=alpha
traceparent 00-1c1f4b30a3316df30c2531c0ba00f06b-4385607e4049d559-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--89014d7f
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound HTTP request headers

baggage routing-key=rk-d0e769dc,team=alpha
ot-baggage-routing-key rk-d0e769dc
traceparent 00-043ea6b12c2c54ecd09cfb9fe31a2803-2604fb23e7821b41-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--74d0795f

Observed at the sink on the outbound AMQP 0-9-1 message headers

baggage routing-key=rk-d0e769dc,team=alpha
traceparent 00-043ea6b12c2c54ecd09cfb9fe31a2803-02efa2579597bdd9-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--74d0795f
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound gRPC metadata

baggage routing-key=rk-2dbf8c31,team=alpha
ot-baggage-routing-key rk-2dbf8c31
traceparent 00-300244e09ab21bb9bfa83cf02835d4e1-5cd84bb35957d76e-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--1f69b431

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip;q=1.0,deflate;q=0.6,identity;q=0.3
content-length 44
content-type application/json
traceparent 00-48efbf78e8643008ef333d2a0b54f97e-74e25b21f4e4fa34-01
user-agent Ruby
test id
otel-ruby--grpc-http--1f69b431
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound gRPC metadata

baggage routing-key=rk-9ed9e891,team=alpha
ot-baggage-routing-key rk-9ed9e891
traceparent 00-daad56ea4832a26da14c5eb7a7c989b6-267e9d6a2f344752-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--31b3c7b3

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-fbe645006142682822eb2ce403710a95-246e09e4ae78b6b6-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--31b3c7b3
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
gRPC Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound gRPC metadata

baggage routing-key=rk-99ca5736,team=alpha
ot-baggage-routing-key rk-99ca5736
traceparent 00-b7978023648c3f67531099d6b85f35f7-06a91c334fb94964-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--ec10309a

Observed at the sink on the outbound Kafka record headers

traceparent 00-96ff38b32bc70f48bcf8687081faff08-651ccfc8c01fcd35-01
test id
otel-ruby--grpc-kafka--ec10309a
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound gRPC metadata

baggage routing-key=rk-e44ee0d4,team=alpha
ot-baggage-routing-key rk-e44ee0d4
traceparent 00-a2d54cf2ce3b3d7482c9c78f23a3a37e-97acf494f2163e3b-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--918c40ac

Observed at the sink on the outbound AMQP 0-9-1 message headers

traceparent 00-ee9a7d3318169f10385b0c2d30a7d2b5-12278596972aa220-01
test id
otel-ruby--grpc-rabbitmq--918c40ac
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-97cc9bdd,team=alpha
ot-baggage-routing-key rk-97cc9bdd
traceparent 00-2317179213b030c05b936cf4173cda15-9473f788dd99bccd-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--e290d712

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip;q=1.0,deflate;q=0.6,identity;q=0.3
baggage routing-key=rk-97cc9bdd,team=alpha
content-length 45
content-type application/json
traceparent 00-2317179213b030c05b936cf4173cda15-89c93b91a2023ef6-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--e290d712
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound Kafka record headers

baggage routing-key=rk-ddd01025,team=alpha
ot-baggage-routing-key rk-ddd01025
traceparent 00-774e916c9ed2c46edb5234593e8ed0e4-01ac77b8482a02d2-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--3e14c397

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-ddd01025,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-774e916c9ed2c46edb5234593e8ed0e4-fcc193a09f1a2f98-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--3e14c397
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
Kafka Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound Kafka record headers

baggage routing-key=rk-15e00f68,team=alpha
ot-baggage-routing-key rk-15e00f68
traceparent 00-acdb01e58430d5955069be8d8178e88e-f0613aa898576335-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--26b7057b

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-15e00f68,team=alpha
traceparent 00-acdb01e58430d5955069be8d8178e88e-e49998c230ddc1f1-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--26b7057b
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
Kafka RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound Kafka record headers

baggage routing-key=rk-0ead69ad,team=alpha
ot-baggage-routing-key rk-0ead69ad
traceparent 00-91a7f20021a07ca749ddc9b46b37da99-202238e5db965529-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--a926b45a

Observed at the sink on the outbound AMQP 0-9-1 message headers

baggage routing-key=rk-0ead69ad,team=alpha
traceparent 00-91a7f20021a07ca749ddc9b46b37da99-922fc39491aac5a3-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--a926b45a
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
RabbitMQ HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-e9c6497f,team=alpha
ot-baggage-routing-key rk-e9c6497f
traceparent 00-2a19ec8535242851dc976f32873a868f-a03c094231d5844d-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--6766b051

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip;q=1.0,deflate;q=0.6,identity;q=0.3
content-length 48
content-type application/json
traceparent 00-e56cb29a168cc483da4ffd70ba5702d0-2721caec74344a05-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--6766b051
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
RabbitMQ gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-cf74e9d7,team=alpha
ot-baggage-routing-key rk-cf74e9d7
traceparent 00-803201bdf8e675f10b7c5d54fd0354a4-808a75853686dc5c-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--b225629b

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-e2c6a55714ec1a594a054f7031480adb-c6b8fa1641d09bfe-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--b225629b
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
RabbitMQ Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-36e11620,team=alpha
ot-baggage-routing-key rk-36e11620
traceparent 00-dc557cb44c66114f0fa3e3c1da1bf424-01be1a651fdb4b64-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--a0ca6655

Observed at the sink on the outbound Kafka record headers

traceparent 00-7dd75f6d489e9465356231da0806cc7e-8cb2ac4b122977ed-01
test id
otel-ruby--rabbitmq-kafka--a0ca6655
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
RabbitMQ RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-6ce30bc8,team=alpha
ot-baggage-routing-key rk-6ce30bc8
traceparent 00-dd06909e089e68a6a7eae16fe39d7bdd-0ef3ad916cb740e1-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--716810a1

Observed at the sink on the outbound AMQP 0-9-1 message headers

traceparent 00-7d6af89d28a67b49c15e3e339e3f575f-d5e3270817983261-01
test id
otel-ruby--rabbitmq-rabbitmq--716810a1
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

Cells are generated by the harness, never transcribed from documentation. Report a wrong one.