otel-ruby

Ruby init-only opentelemetry-sdk1.10.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.10.0 1.10.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:50 UTC
Harness
e793604 · measured in backtest-otel-ruby-1.10.0
Raw JSON
1.10.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-65852277,team=alpha
ot-baggage-routing-key rk-65852277
traceparent 00-434fbb85da23b8a99a07b74de26114ab-fce1b0d596f4694c-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--069cecbe

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-65852277,team=alpha
content-length 44
content-type application/json
traceparent 00-434fbb85da23b8a99a07b74de26114ab-28c304ebc47e9742-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--069cecbe
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-736f831f,team=alpha
ot-baggage-routing-key rk-736f831f
traceparent 00-243b404323261058228740d7fb368b91-98d05c3ba8f8f52e-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--afe8bb30

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-736f831f,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-243b404323261058228740d7fb368b91-2cd09b887c80584c-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--afe8bb30
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-7c89b264,team=alpha
ot-baggage-routing-key rk-7c89b264
traceparent 00-faf61eb13b8fd74e2040c5b9e54f7adb-e379ba0f04a4ca4a-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--7e496ed9

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-7c89b264,team=alpha
traceparent 00-faf61eb13b8fd74e2040c5b9e54f7adb-64ddb863b09fcbc8-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--7e496ed9
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-9e7f0c48,team=alpha
ot-baggage-routing-key rk-9e7f0c48
traceparent 00-29a0b556e434feb63b892637512e4f4b-f950d7744f960c03-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--a0e327f8

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

baggage routing-key=rk-9e7f0c48,team=alpha
traceparent 00-29a0b556e434feb63b892637512e4f4b-79fd35e2dc4b0039-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--a0e327f8
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-c7c34027,team=alpha
ot-baggage-routing-key rk-c7c34027
traceparent 00-b7fa4a3dc2e5bbe46b8611a10c33cf01-21591ab8f93b270d-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--b3b73b9d

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-3b2c778c79b3e3d2b864a2bfea16a00c-0cbbd4ee8e4dcb5c-01
user-agent Ruby
test id
otel-ruby--grpc-http--b3b73b9d
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-70143c32,team=alpha
ot-baggage-routing-key rk-70143c32
traceparent 00-debfcd826af7dab5d418e11823d99527-a83d94d2cb1d9d38-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--fea3709e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-2a7bf5042de99793acfc4c8d1bf69b79-c56ea4f5585bacdc-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--fea3709e
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-1625ead1,team=alpha
ot-baggage-routing-key rk-1625ead1
traceparent 00-2e63b6c089237f0f16781368ab296375-ad895990f113c409-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--e5914d7f

Observed at the sink on the outbound Kafka record headers

traceparent 00-b8072662c78bd72c089391bb31566081-49d87f3a83671196-01
test id
otel-ruby--grpc-kafka--e5914d7f
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-53a43341,team=alpha
ot-baggage-routing-key rk-53a43341
traceparent 00-77ab29de5156a1422a9a83ccfded3333-4767eb43b559df1f-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--a14b6e0b

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

traceparent 00-80653092b78227de76b4efc59c00f496-3a6bef0d510c77b5-01
test id
otel-ruby--grpc-rabbitmq--a14b6e0b
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-9c68e5f8,team=alpha
ot-baggage-routing-key rk-9c68e5f8
traceparent 00-a92dd86e2188e33cb6a4990ffdaff7d2-011c7a9344deb5f7-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--6580bbcf

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-9c68e5f8,team=alpha
content-length 45
content-type application/json
traceparent 00-a92dd86e2188e33cb6a4990ffdaff7d2-7d02ed4833fd859c-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--6580bbcf
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-b178ae4e,team=alpha
ot-baggage-routing-key rk-b178ae4e
traceparent 00-8ca7550ec5ef3e3eced9ee00c396643d-a4ecae37e74a9f6f-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--1d69a8c9

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-b178ae4e,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-8ca7550ec5ef3e3eced9ee00c396643d-fa91d56940c05570-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--1d69a8c9
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-19afb0ab,team=alpha
ot-baggage-routing-key rk-19afb0ab
traceparent 00-8e2232815860277f9b8a2605eeaa5e9c-6273b3b9e5c27485-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--668024ae

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-19afb0ab,team=alpha
traceparent 00-8e2232815860277f9b8a2605eeaa5e9c-7340f7e36b87beb6-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--668024ae
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-d97a403f,team=alpha
ot-baggage-routing-key rk-d97a403f
traceparent 00-0663967b2f80ff818d12096519d4c2f4-93209abf2db2a3cd-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--6398ea5b

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

baggage routing-key=rk-d97a403f,team=alpha
traceparent 00-0663967b2f80ff818d12096519d4c2f4-e5cad77682515aac-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--6398ea5b
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-4e5f73ce,team=alpha
ot-baggage-routing-key rk-4e5f73ce
traceparent 00-8178a7d46de8ea5dcd27b9deae121c93-232b29d6966e76b7-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--8487fb9c

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-73be9297a1c76b9f5ca43d3244ce4714-8502d5a51f48c8b9-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--8487fb9c
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-479deab4,team=alpha
ot-baggage-routing-key rk-479deab4
traceparent 00-4602a8be8bab0064201216d34856aae5-5f5b226845b3074f-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--62f1e506

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-816f51cb0de3d03a502f7a93a82cc250-791a4cb4b0aeaa8b-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--62f1e506
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-9bb4b262,team=alpha
ot-baggage-routing-key rk-9bb4b262
traceparent 00-7c4bc957777881915c1bcc2f1c85f576-45ecddc44647bfd3-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--40f6c952

Observed at the sink on the outbound Kafka record headers

traceparent 00-6c9a9ce953f7f33270bce01665adf750-577446dfeae11711-01
test id
otel-ruby--rabbitmq-kafka--40f6c952
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-33314848,team=alpha
ot-baggage-routing-key rk-33314848
traceparent 00-3636478ca86478433329455d4db92b1f-1c2159a56a340b4c-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--8e83d4a0

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

traceparent 00-cf6ab774b52f4db56dc8fe6c0d1df581-b2774c95ad2cde84-01
test id
otel-ruby--rabbitmq-rabbitmq--8e83d4a0
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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