otel-ruby

Ruby init-only opentelemetry-sdk1.3.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.3.0 1.3.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
10 Nov 2026, 07:45 UTC
Harness
9b99070 · measured in backtest-otel-ruby-1.3.0
Raw JSON
1.3.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-aa4594f0,team=alpha
ot-baggage-routing-key rk-aa4594f0
traceparent 00-44f0929c75b72e6c77e4585f94018f2d-9064c841b39da9c7-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--ca6b29ee

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-aa4594f0,team=alpha
content-length 44
content-type application/json
traceparent 00-44f0929c75b72e6c77e4585f94018f2d-148bd06b26c058b1-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--ca6b29ee
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-d0167ddf,team=alpha
ot-baggage-routing-key rk-d0167ddf
traceparent 00-79e2e956daa85a95c3affa076b3d4eec-03587bf1bef69429-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--06257af3

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-d0167ddf,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-79e2e956daa85a95c3affa076b3d4eec-94d588639f70f926-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--06257af3
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-8f7de41a,team=alpha
ot-baggage-routing-key rk-8f7de41a
traceparent 00-8fb2a4ad157442705ffac41fd76fa585-e6cae2ceadd11958-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--f515a0ba

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-8f7de41a,team=alpha
traceparent 00-8fb2a4ad157442705ffac41fd76fa585-d17579dcf085a645-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--f515a0ba
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-1f17b0ea,team=alpha
ot-baggage-routing-key rk-1f17b0ea
traceparent 00-bb6af459ad79b53dbede91e7d72b2ede-966ddef3ba8a49ae-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--d00e0daa

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

baggage routing-key=rk-1f17b0ea,team=alpha
traceparent 00-bb6af459ad79b53dbede91e7d72b2ede-daebeb6102c33627-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--d00e0daa
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-d87e4ddf,team=alpha
ot-baggage-routing-key rk-d87e4ddf
traceparent 00-f48b349cf2e599c09b2ded99903fa9a1-9b8d77419c2317ae-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--f06c7d98

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-5643032fe4cd14eb85e842ebdf31ace1-9ab4b25c0dfafafe-01
user-agent Ruby
test id
otel-ruby--grpc-http--f06c7d98
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-ed44cab5,team=alpha
ot-baggage-routing-key rk-ed44cab5
traceparent 00-9fab34b5e6569324d6a27d11b2624e43-525bda52c3c146b8-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--fee932ed

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-63b2e93e739efaa416df499b02ac8589-049e37968190e61b-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--fee932ed
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-b4b3e5a3,team=alpha
ot-baggage-routing-key rk-b4b3e5a3
traceparent 00-bbc9121900e4f0152370421dc19fcc9e-c5920aab3d4f7dda-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--4ef3bca7

Observed at the sink on the outbound Kafka record headers

traceparent 00-b4636682ceca6745b31c52c3a8255b71-1ac06fb13bcb188e-01
test id
otel-ruby--grpc-kafka--4ef3bca7
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-f05bc406,team=alpha
ot-baggage-routing-key rk-f05bc406
traceparent 00-08321ce5320c53ce2d790e46dfe213c3-4c2be0bb99cc049a-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--bdd763cf

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

traceparent 00-f45d13306e5d8a747d45b841887eae01-285bc5d0dc6b2b96-01
test id
otel-ruby--grpc-rabbitmq--bdd763cf
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-6207d569,team=alpha
ot-baggage-routing-key rk-6207d569
traceparent 00-7dd07cf6c2a24ac64317dec81da64f3a-c4c338a21eb4d2f1-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--c668102c

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-6207d569,team=alpha
content-length 45
content-type application/json
traceparent 00-7dd07cf6c2a24ac64317dec81da64f3a-57ddac83125bac1e-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--c668102c
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-3104edc0,team=alpha
ot-baggage-routing-key rk-3104edc0
traceparent 00-9d8cfab7cc42c20469750661c7d44f4c-d05ef7bf993bf8de-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--c709c447

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-3104edc0,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-9d8cfab7cc42c20469750661c7d44f4c-614a21088787f3b7-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--c709c447
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-1e8032b5,team=alpha
ot-baggage-routing-key rk-1e8032b5
traceparent 00-4e5301fff6197633bcff3b028bc2d46d-4df7a83257428e58-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--d9d1155c

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-1e8032b5,team=alpha
traceparent 00-4e5301fff6197633bcff3b028bc2d46d-7fff1636a87b5378-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--d9d1155c
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-e2afdc04,team=alpha
ot-baggage-routing-key rk-e2afdc04
traceparent 00-eb18f58909717eaf4a6d6318493631f2-19b2e2da81f6d0b4-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--86a6a9cd

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

baggage routing-key=rk-e2afdc04,team=alpha
traceparent 00-eb18f58909717eaf4a6d6318493631f2-fd5b12f2f558648c-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--86a6a9cd
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-9ca9b729,team=alpha
ot-baggage-routing-key rk-9ca9b729
traceparent 00-86cc195d76e47c569507e383cc7e6569-6c8d38c12e626b92-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--d93d6a14

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-d69299af6f607efa94034b5bfa692a95-f45fca6538ee13b0-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--d93d6a14
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-bc64eb6d,team=alpha
ot-baggage-routing-key rk-bc64eb6d
traceparent 00-d230faf3ea735f5190d3e65a38b78e74-9e320c1b67d2d4d3-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--bd2dc602

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-f544b064e667701bd6f33271b1e07c4f-9942c54e0884de4e-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--bd2dc602
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-d1572359,team=alpha
ot-baggage-routing-key rk-d1572359
traceparent 00-6e8e63846f4ab80b4d64905cbf138ff0-0d757655983f8a78-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--3c7cafe2

Observed at the sink on the outbound Kafka record headers

traceparent 00-5b0d55ec4170fac82825b5a143813b1a-9a4a8c8d79ec1ba3-01
test id
otel-ruby--rabbitmq-kafka--3c7cafe2
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-181b50f8,team=alpha
ot-baggage-routing-key rk-181b50f8
traceparent 00-d2ce059f977594848ff473fd8d429c47-24b43afd0b38f06e-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--b3f56947

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

traceparent 00-5c839d9afdde621208e5d34bbfd18f03-2c985f346ebd8cb4-01
test id
otel-ruby--rabbitmq-rabbitmq--b3f56947
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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