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
30 Nov 2026, 06:44 UTC
Harness
ae4b9c9 · run run-2026-11-30.1
Raw JSON
run-2026-11-30.1.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-23f5f01e,team=alpha
ot-baggage-routing-key rk-23f5f01e
traceparent 00-0c5baa0dcac359ec01f2266441457a14-3c530f545dbafe01-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--bb11011c

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-23f5f01e,team=alpha
content-length 44
content-type application/json
traceparent 00-0c5baa0dcac359ec01f2266441457a14-737448ad21d9f803-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--bb11011c
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-a9a6392b,team=alpha
ot-baggage-routing-key rk-a9a6392b
traceparent 00-4e8e13d2ab93feba9ae629acf225f06a-57d3ffa09b18c32f-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--872a156d

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-a9a6392b,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-4e8e13d2ab93feba9ae629acf225f06a-e001fe9fd31240a9-01
tracestate cptest=v1
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--872a156d
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-44f4b2db,team=alpha
ot-baggage-routing-key rk-44f4b2db
traceparent 00-f5993fb988b7e28601fa48cfecf82756-859d3a34c8ea0e62-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--25c8ede1

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-44f4b2db,team=alpha
traceparent 00-f5993fb988b7e28601fa48cfecf82756-22fdf1ba2e806527-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--25c8ede1
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-c8ab961f,team=alpha
ot-baggage-routing-key rk-c8ab961f
traceparent 00-373a7fd1b1fc63291030432753a98adf-1e61c76730d56004-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--b1ba6e79

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

baggage routing-key=rk-c8ab961f,team=alpha
traceparent 00-373a7fd1b1fc63291030432753a98adf-9273bc2f1623bb86-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--b1ba6e79
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-bf5caf4f,team=alpha
ot-baggage-routing-key rk-bf5caf4f
traceparent 00-da64a4c20b1034fae40e93703cca7a5a-97de92ad4a65eb58-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--b4e0867e

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-a42e9f42e9bc7c5d6aa86ef21bd2918f-a1894961ef16dab4-01
user-agent Ruby
test id
otel-ruby--grpc-http--b4e0867e
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-2f517d54,team=alpha
ot-baggage-routing-key rk-2f517d54
traceparent 00-abf19e1238592f2bcf72320fbf3b6a92-aae2302632cbb972-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--014827e2

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-620abe5c56b701105f363dfd89a71f6e-c195bf11cfa4a1e3-01
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--014827e2
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-22d17dd2,team=alpha
ot-baggage-routing-key rk-22d17dd2
traceparent 00-deb3dbbaeba0a4585ef942d13ecb67c0-56d50127c750f0af-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--d6230c5e

Observed at the sink on the outbound Kafka record headers

traceparent 00-d1dda724a7cc006851a02d1af51e7163-2f3a5630629ddf29-01
test id
otel-ruby--grpc-kafka--d6230c5e
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-071dac47,team=alpha
ot-baggage-routing-key rk-071dac47
traceparent 00-d4523dbb38e7cd4e0fc29042742baa10-c88eacad494dc2d7-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--af9380d1

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

traceparent 00-af85b84a5f32e80b0162309594cb3922-f6c71136c6479728-01
test id
otel-ruby--grpc-rabbitmq--af9380d1
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-2113891b,team=alpha
ot-baggage-routing-key rk-2113891b
traceparent 00-45e3938c3149b1b06d6e8dde63f7fb15-a433cfab34d33b91-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--ae3a5e15

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-2113891b,team=alpha
content-length 45
content-type application/json
traceparent 00-45e3938c3149b1b06d6e8dde63f7fb15-0440fe9b7ceaf704-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--ae3a5e15
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-b4160afd,team=alpha
ot-baggage-routing-key rk-b4160afd
traceparent 00-12fe5fcdf86ab053c315c51dc7c5fae6-8ca0f6b023c54c55-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--f6ea2c40

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-b4160afd,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-12fe5fcdf86ab053c315c51dc7c5fae6-d3af83f2bd551327-01
tracestate cptest=v1
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--f6ea2c40
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-312b6a44,team=alpha
ot-baggage-routing-key rk-312b6a44
traceparent 00-87ec69080327dfd59acb52e4ffe275b2-dd24f9943cf092ab-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--d929fea6

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-312b6a44,team=alpha
traceparent 00-87ec69080327dfd59acb52e4ffe275b2-f5d1df4ed70d01a2-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--d929fea6
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-252ebf28,team=alpha
ot-baggage-routing-key rk-252ebf28
traceparent 00-397af486b56260a910fa0179d72ef671-8d0a83309f1e1f6b-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--019229ef

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

baggage routing-key=rk-252ebf28,team=alpha
traceparent 00-397af486b56260a910fa0179d72ef671-fdd7b8aafa32eec9-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--019229ef
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-122b9c33,team=alpha
ot-baggage-routing-key rk-122b9c33
traceparent 00-9e785038bed3e91ade942f3586979083-5f7c96f231383751-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--2b00d791

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-78a7350560342e71d47422ccb1e8ac7e-1b6b18cde077249c-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--2b00d791
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-ce3e046a,team=alpha
ot-baggage-routing-key rk-ce3e046a
traceparent 00-ac78a0a448fa2ac509b17cce600d6299-8a7e5bf5c8da93a3-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--8e2ee580

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-4adf056f0d9a139d86cc61e7e9173418-bd883b5075c65d8b-01
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--8e2ee580
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-5d6fe388,team=alpha
ot-baggage-routing-key rk-5d6fe388
traceparent 00-6f4f6da0de48815d85ef14f4b99d01a4-5d1c201cc66ab164-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--0febe6d0

Observed at the sink on the outbound Kafka record headers

traceparent 00-584edf21efe2faf534a89501f473e22d-1bd6346553f6aac1-01
test id
otel-ruby--rabbitmq-kafka--0febe6d0
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-76062730,team=alpha
ot-baggage-routing-key rk-76062730
traceparent 00-4bf675fdb784a74ba24e11b498c14c37-b6ca905b49bd92d4-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--aea4de12

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

traceparent 00-4f285ac39e03f0a1f4c9e6d249fb7040-f79eeca4c1bd5e74-01
test id
otel-ruby--rabbitmq-rabbitmq--aea4de12
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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