otel-ruby

Ruby init-only opentelemetry-sdk1.3.1

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.3.1 1.3.1 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
10 Nov 2026, 07:42 UTC
Harness
9b99070 · measured in backtest-otel-ruby-1.3.1
Raw JSON
1.3.1.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-3c48398a,team=alpha
ot-baggage-routing-key rk-3c48398a
traceparent 00-e99d405b6b426acb64c137a7c8df692c-184896a6b20eef47-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--89491723

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-3c48398a,team=alpha
content-length 44
content-type application/json
traceparent 00-e99d405b6b426acb64c137a7c8df692c-3efb21b153fbf13c-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--89491723
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-9f2077bd,team=alpha
ot-baggage-routing-key rk-9f2077bd
traceparent 00-52b091e22141de8c990f319926e2392d-829c5194924f7900-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--92f1f5e0

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-9f2077bd,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-52b091e22141de8c990f319926e2392d-26d6b1772adc7278-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--92f1f5e0
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-60f5db3d,team=alpha
ot-baggage-routing-key rk-60f5db3d
traceparent 00-66436e2292e470f1ed401025bad6361c-f1727dba464a3221-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--0ed2b6ba

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-60f5db3d,team=alpha
traceparent 00-66436e2292e470f1ed401025bad6361c-babb16f17ed6c28e-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--0ed2b6ba
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-14df532f,team=alpha
ot-baggage-routing-key rk-14df532f
traceparent 00-c495e66e0423ec7c66dbf0efe8902013-e06c421b9ffd68de-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--c980bc58

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

baggage routing-key=rk-14df532f,team=alpha
traceparent 00-c495e66e0423ec7c66dbf0efe8902013-2823e4a43daa3137-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--c980bc58
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-873fbe70,team=alpha
ot-baggage-routing-key rk-873fbe70
traceparent 00-57908e4947f996e6cb5ae2592d77a15a-6ffd8351acb36e2c-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--ebd76dab

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-d701366e5e016a7e2ef58e0ab87d209e-febdfe46781d91a9-01
user-agent Ruby
test id
otel-ruby--grpc-http--ebd76dab
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-5d5dd87b,team=alpha
ot-baggage-routing-key rk-5d5dd87b
traceparent 00-f885ef9be9ade9c9eb1535ccfef46137-6285473e25b5ba8c-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--5114090b

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-17614c0109a750df94dc73860cd41c2e-a968ad1f31ddfe13-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--5114090b
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-74ef2794,team=alpha
ot-baggage-routing-key rk-74ef2794
traceparent 00-9c81069b1069d559624d13dd1c7e4c61-b0d3f156b1fbf8c2-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--afb190ea

Observed at the sink on the outbound Kafka record headers

traceparent 00-d4689c143247e1f8e8212fce94f58e22-69596952834f6f7d-01
test id
otel-ruby--grpc-kafka--afb190ea
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-47a14dd0,team=alpha
ot-baggage-routing-key rk-47a14dd0
traceparent 00-e8e562265ad315608defa7829787d7e5-2ea3f8b1f5485f63-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--957f3737

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

traceparent 00-36c1df4519f3c5ac6a936d638ddd1cc4-ae0b1be2151de51a-01
test id
otel-ruby--grpc-rabbitmq--957f3737
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-cdb55b6b,team=alpha
ot-baggage-routing-key rk-cdb55b6b
traceparent 00-0f6d575cccbc48965326ea1a8a74748d-445711d3dfcdc9f4-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--c388b692

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-cdb55b6b,team=alpha
content-length 45
content-type application/json
traceparent 00-0f6d575cccbc48965326ea1a8a74748d-db8d488f23ad31e9-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--c388b692
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-6e4f0085,team=alpha
ot-baggage-routing-key rk-6e4f0085
traceparent 00-5bbd10d85b588cc7c950ed8d5580eabf-5ec7e030a8c94923-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--c398c73a

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-6e4f0085,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-5bbd10d85b588cc7c950ed8d5580eabf-309ddff6aeb047e0-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--c398c73a
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-f9d44cbd,team=alpha
ot-baggage-routing-key rk-f9d44cbd
traceparent 00-778af9ef5cc57099a051109c1fc08add-3fb873131c5d7f52-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--e156774b

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-f9d44cbd,team=alpha
traceparent 00-778af9ef5cc57099a051109c1fc08add-4fbfc01f3136f05e-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--e156774b
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-24c93d44,team=alpha
ot-baggage-routing-key rk-24c93d44
traceparent 00-f9ef3d7a1b1a49bbd6744d3d42da59c7-709d55b9172fc2bf-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--cbd7bf9e

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

baggage routing-key=rk-24c93d44,team=alpha
traceparent 00-f9ef3d7a1b1a49bbd6744d3d42da59c7-0f0c8ce6109cdfa5-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--cbd7bf9e
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-95856d37,team=alpha
ot-baggage-routing-key rk-95856d37
traceparent 00-9f2f5928cd7a5e48f2ef0afd812a27d0-3db79867e1a2de84-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--57275123

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-2e9699962b65f7cb0e214d45fd12d3ca-fdbaa4323ed59305-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--57275123
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-88550e8e,team=alpha
ot-baggage-routing-key rk-88550e8e
traceparent 00-6466f5e33172421f7509ef62067752be-e8e136f05ca6f519-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--9e607192

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-222f349aa2027857927b4febb8b81fee-baa556d6e5794935-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--9e607192
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-a67fa09b,team=alpha
ot-baggage-routing-key rk-a67fa09b
traceparent 00-df8c44edc497b31e880fbe31838fd2f0-476245083f15b573-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--14318860

Observed at the sink on the outbound Kafka record headers

traceparent 00-8b117c9daa3f55bcfbff19dbf2e2f1d9-c7cbdfa2d0e55b15-01
test id
otel-ruby--rabbitmq-kafka--14318860
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-f0865dc8,team=alpha
ot-baggage-routing-key rk-f0865dc8
traceparent 00-3f55b2bf49bbf22f40fcabf165181c84-dcb638e88414d65a-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--bf52232d

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

traceparent 00-6759d5ddfba14c14e465da9cd842310c-d8a9b84f2fbc18df-01
test id
otel-ruby--rabbitmq-rabbitmq--bf52232d
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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