otel-ruby

Ruby init-only opentelemetry-sdk1.9.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.9.0 1.9.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.9.0
Raw JSON
1.9.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-2e9322bc,team=alpha
ot-baggage-routing-key rk-2e9322bc
traceparent 00-a861a36237fb058d61522ac8c8cb75e5-ed9cbd8080b07b64-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--8470587d

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-2e9322bc,team=alpha
content-length 44
content-type application/json
traceparent 00-a861a36237fb058d61522ac8c8cb75e5-71c2c9671153b89e-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--8470587d
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-e9aae6ee,team=alpha
ot-baggage-routing-key rk-e9aae6ee
traceparent 00-c210c733e5eded0fd748780e0f97cc19-dd83263a3b08e2c1-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--b6afb1d9

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-e9aae6ee,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-c210c733e5eded0fd748780e0f97cc19-068ae38082c10a9a-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--b6afb1d9
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-5302f280,team=alpha
ot-baggage-routing-key rk-5302f280
traceparent 00-50ba7cb057904a08c32b5e7294f880f5-e6346253651be84d-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--be504e11

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-5302f280,team=alpha
traceparent 00-50ba7cb057904a08c32b5e7294f880f5-e2b359a18f72319b-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--be504e11
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-f8755ee1,team=alpha
ot-baggage-routing-key rk-f8755ee1
traceparent 00-599a1b327cf2a6e7d5ec428cc745061f-e06e52e9bdd18a3b-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--6d0df99f

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

baggage routing-key=rk-f8755ee1,team=alpha
traceparent 00-599a1b327cf2a6e7d5ec428cc745061f-4c9a61f89370b216-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--6d0df99f
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-909237b5,team=alpha
ot-baggage-routing-key rk-909237b5
traceparent 00-07f58bbf8a4da7bd2db14ca353840c49-40cead7eabdade54-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--8e0167c6

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-cd238c863793bf5baaf7fc2bc5279861-f4776f16c82a99c4-01
user-agent Ruby
test id
otel-ruby--grpc-http--8e0167c6
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-fbe0e513,team=alpha
ot-baggage-routing-key rk-fbe0e513
traceparent 00-7ab47d6f8e66c8ae595e18a4bd440aad-5297b46c3626da6b-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--774566c9

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-a7d94526f8aaf121836730fb2b0ab23a-fb8319a68c637fea-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--774566c9
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-009d8274,team=alpha
ot-baggage-routing-key rk-009d8274
traceparent 00-fe4522bb343c14f49fd2a5cdaf215fa1-b9cc8dd20b01bc4c-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--84055206

Observed at the sink on the outbound Kafka record headers

traceparent 00-409b7e200b5690aefd6220e548cacb2a-ddfb2bed07019790-01
test id
otel-ruby--grpc-kafka--84055206
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-77bf9872,team=alpha
ot-baggage-routing-key rk-77bf9872
traceparent 00-97c088ac26d0093567ce142feaa46c6b-cb9a9c18f37b32b2-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--05f6f61e

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

traceparent 00-ad96eba55e35ff9b5c8c8a54a94fd660-32c8c8d0abb6c135-01
test id
otel-ruby--grpc-rabbitmq--05f6f61e
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-9588c1c1,team=alpha
ot-baggage-routing-key rk-9588c1c1
traceparent 00-b5e4648c69a094482bf575433bf41974-66018260af8c02c4-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--eb4ec5c2

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-9588c1c1,team=alpha
content-length 45
content-type application/json
traceparent 00-b5e4648c69a094482bf575433bf41974-39fe14bb8e499311-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--eb4ec5c2
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-1696e8fc,team=alpha
ot-baggage-routing-key rk-1696e8fc
traceparent 00-b668e1bd78e2745520bb421561f7ff1b-f035cda5d96b89b8-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--3022eb93

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-1696e8fc,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-b668e1bd78e2745520bb421561f7ff1b-c2511b59010073e1-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--3022eb93
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-0e744d9a,team=alpha
ot-baggage-routing-key rk-0e744d9a
traceparent 00-b3de51ac89184c9fa2c21800593a7ad6-e1c3bd333b175b6a-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--caef3dfa

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-0e744d9a,team=alpha
traceparent 00-b3de51ac89184c9fa2c21800593a7ad6-3c4edc1b744e6d91-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--caef3dfa
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-2297ddfc,team=alpha
ot-baggage-routing-key rk-2297ddfc
traceparent 00-901817062db82cf446a302e7ace9f96d-6b5c800625029388-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--28538099

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

baggage routing-key=rk-2297ddfc,team=alpha
traceparent 00-901817062db82cf446a302e7ace9f96d-69cca3690a26e616-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--28538099
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-a6798f58,team=alpha
ot-baggage-routing-key rk-a6798f58
traceparent 00-ba1636e9542d20fec26e319e50d9b60d-51d31a5302809e03-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--2903a53b

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-38122e35c5825b9d96b8c93c5c72f587-e40908f18e222477-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--2903a53b
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-08e2ed3c,team=alpha
ot-baggage-routing-key rk-08e2ed3c
traceparent 00-71999e308218c61b534f8adfb261e2f3-11424ae130b4d2ce-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--b71489d0

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-c36512bbe738d151b81aca7f0696822d-0b47e7cfd59680ab-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--b71489d0
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-81313fa9,team=alpha
ot-baggage-routing-key rk-81313fa9
traceparent 00-8d33edf461cadf9e0ea5b7278ee62c68-992955b959b8b9e2-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--c3c9d7a6

Observed at the sink on the outbound Kafka record headers

traceparent 00-30ac30ca2c3f708b599b4ea08a287617-677da8b0c6e9826b-01
test id
otel-ruby--rabbitmq-kafka--c3c9d7a6
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-b1202c7f,team=alpha
ot-baggage-routing-key rk-b1202c7f
traceparent 00-e13525443dbe9abd89fe8018101dca8c-1b56f466a253382e-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--58b427f6

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

traceparent 00-4c3395c5421fc1fa5fe5933d26c4203d-7505806674a4dbac-01
test id
otel-ruby--rabbitmq-rabbitmq--58b427f6
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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