otel-ruby

Ruby init-only opentelemetry-sdk1.13.1

attach require 'opentelemetry/sdk' and six instrumentation gems; SDK.configure with c.use for each

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

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).

140 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 in this run

Tracer
opentelemetry-sdk 1.13.1 this version 1.13.1 on rubygems github
Runtime
ruby 3.3.14
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' and six instrumentation gems; SDK.configure with c.use for each
Relay source
relays/ruby/gemfiles/otel
Ran at
24 Nov 2026, 14:03 UTC
Harness
0ce08fa · run run-2026-11-24.3
Raw JSON
run-2026-11-24.3.json → variants[id = "otel-ruby"]

Libraries

grpcgrpc 1.85.0 + opentelemetry-instrumentation-grpc 0.5.3
http-clientnet/http (stdlib) + opentelemetry-instrumentation-net_http 0.30.0
http-serversinatra 4.2.2 (puma 8.1.2) + opentelemetry-instrumentation-sinatra 0.31.0 + opentelemetry-instrumentation-rack 0.32.0
kafkardkafka 0.31.0 + opentelemetry-instrumentation-rdkafka 0.10.0
rabbitmqbunny 3.6.0 + opentelemetry-instrumentation-bunny 0.25.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-7907e720,team=alpha
ot-baggage-routing-key rk-7907e720
traceparent 00-1906f9975f4d16a25b30adfe8d0bca27-0a586f1e84ac4987-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--76a486bd

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-7907e720,team=alpha
content-length 44
content-type application/json
traceparent 00-1906f9975f4d16a25b30adfe8d0bca27-36be4fc9cc941963-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--76a486bd
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-0bd5a529,team=alpha
ot-baggage-routing-key rk-0bd5a529
traceparent 00-a43aa3b78323c0730b3a9c7c6e4e196b-feb58df439a970f2-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--b111f5ae

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-0bd5a529,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-a43aa3b78323c0730b3a9c7c6e4e196b-8b36c305f1557543-01
tracestate cptest=v1
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--b111f5ae
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-1f97fdfe,team=alpha
ot-baggage-routing-key rk-1f97fdfe
traceparent 00-c52300cd7857f59afe28db45acbc811c-22ae89b2701a9c4f-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--ccdd60ac

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-1f97fdfe,team=alpha
traceparent 00-c52300cd7857f59afe28db45acbc811c-48bf6ab9f0f7e390-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--ccdd60ac
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-3f77ed2c,team=alpha
ot-baggage-routing-key rk-3f77ed2c
traceparent 00-0b93bf8aa4983937dcce5a24a3e9c541-875e0096e4202de8-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--2647c4ce

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

baggage routing-key=rk-3f77ed2c,team=alpha
traceparent 00-0b93bf8aa4983937dcce5a24a3e9c541-9933571a45974a31-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--2647c4ce
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-12a055cc,team=alpha
ot-baggage-routing-key rk-12a055cc
traceparent 00-0484d55dd2583d1928046c2b195d1c61-38cbf4dfa745a313-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--9f91e4d3

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-03abf29984fe1a0bb1c5f33f52c15d9d-be7b3feb8954d4b4-01
user-agent Ruby
test id
otel-ruby--grpc-http--9f91e4d3
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-904beef1,team=alpha
ot-baggage-routing-key rk-904beef1
traceparent 00-e35bdce7ca3114570175de88cdb58acc-7eade24c5d0a54fa-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--fc2019c5

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-28ca3b3118d8ca9913892f8fb6894a9a-fb2ec26f4cdb6e4a-01
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--fc2019c5
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-ab919719,team=alpha
ot-baggage-routing-key rk-ab919719
traceparent 00-f0342a29607c606e07c1353bc1099d31-ca6cda1a95fbfdc6-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--e01213b9

Observed at the sink on the outbound Kafka record headers

traceparent 00-0318ca3203515b8f864cae3c9b3eed36-5a152a45b3559bb7-01
test id
otel-ruby--grpc-kafka--e01213b9
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-cbc163c0,team=alpha
ot-baggage-routing-key rk-cbc163c0
traceparent 00-cc580771195af0ca716d9ee4bdaee707-28ca10ab081537a1-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--e306d277

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

traceparent 00-bd8a5bddc9858d9b7e07b4f29148f641-f9da0c01330dc085-01
test id
otel-ruby--grpc-rabbitmq--e306d277
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-c7724906,team=alpha
ot-baggage-routing-key rk-c7724906
traceparent 00-75e4aa8deab355a94e00360e6a5bfeac-f9034c8eb80ae821-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--354b779a

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-c7724906,team=alpha
content-length 45
content-type application/json
traceparent 00-75e4aa8deab355a94e00360e6a5bfeac-ac1b11d057d38cfe-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--354b779a
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-d76b99ea,team=alpha
ot-baggage-routing-key rk-d76b99ea
traceparent 00-3eb9dab5793865f20ffd8d319f2283a2-80267cce7fb69796-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--c8deb95f

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-d76b99ea,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-3eb9dab5793865f20ffd8d319f2283a2-47a5bbf8d5611a8a-01
tracestate cptest=v1
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--c8deb95f
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-3fd84e8d,team=alpha
ot-baggage-routing-key rk-3fd84e8d
traceparent 00-60f4716b47ac7985f33ab8baf6bbdebc-0b67dc94523e28a0-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--d13f7805

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-3fd84e8d,team=alpha
traceparent 00-60f4716b47ac7985f33ab8baf6bbdebc-258f2fa62c1bc213-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--d13f7805
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-f1b15ac1,team=alpha
ot-baggage-routing-key rk-f1b15ac1
traceparent 00-0da2cfffe14df412e4518a6b6694191a-034d12e1bbc02f64-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--21cb8043

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

baggage routing-key=rk-f1b15ac1,team=alpha
traceparent 00-0da2cfffe14df412e4518a6b6694191a-1212cc87381be699-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--21cb8043
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-6b9a156b,team=alpha
ot-baggage-routing-key rk-6b9a156b
traceparent 00-993f4094838ac0241621480d50315d63-df8d3c383bd60346-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--32eaa63c

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-ef3a3e061e391d8a7565bbfda402f4fa-02b955a4aa2de60a-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--32eaa63c
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-5aa40242,team=alpha
ot-baggage-routing-key rk-5aa40242
traceparent 00-92c30267a20f3de72abcf7357517b590-c9e875fe606e36bf-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--09c33167

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-bf8a1a3964a295c6839938e59366815c-a4e5485408c81fec-01
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--09c33167
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-7693d078,team=alpha
ot-baggage-routing-key rk-7693d078
traceparent 00-26ef5148430d4f85471684cd32cf99b0-662757b6c0f36d33-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--b14cffbc

Observed at the sink on the outbound Kafka record headers

traceparent 00-3ff746da900098d1d38fe38561419681-9bbe16155e93877b-01
test id
otel-ruby--rabbitmq-kafka--b14cffbc
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-7a7f3c66,team=alpha
ot-baggage-routing-key rk-7a7f3c66
traceparent 00-318f9d8185866c99864dcdf38b58c0d2-be646d34297fd3bf-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--c2bd42b9

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

traceparent 00-12d831df901a6d4fa8aecc984bc45176-d43041c0ee9022ac-01
test id
otel-ruby--rabbitmq-rabbitmq--c2bd42b9
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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