otel-ruby

Ruby init-only opentelemetry-sdk1.11.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.11.0 1.11.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.11.0
Raw JSON
1.11.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-0c087362,team=alpha
ot-baggage-routing-key rk-0c087362
traceparent 00-89e3099c4defc44e253bab6effa3c6de-aa397e7330003470-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--26202f17

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-0c087362,team=alpha
content-length 44
content-type application/json
traceparent 00-89e3099c4defc44e253bab6effa3c6de-b32fe7bc50fa4cad-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--26202f17
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-44a26ea9,team=alpha
ot-baggage-routing-key rk-44a26ea9
traceparent 00-f139aad9affafc0dd6825a39e5f37aff-4a3a27373f05ef97-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--e55c0f7c

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-44a26ea9,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-f139aad9affafc0dd6825a39e5f37aff-b1a42398fa0ee521-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--e55c0f7c
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-7714f69c,team=alpha
ot-baggage-routing-key rk-7714f69c
traceparent 00-c05191fd21a3722e3603d9f8e5907f93-4a13cacd2bc57f3f-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--6bb51990

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-7714f69c,team=alpha
traceparent 00-c05191fd21a3722e3603d9f8e5907f93-3ae5e9ca716a0326-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--6bb51990
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-e57b8776,team=alpha
ot-baggage-routing-key rk-e57b8776
traceparent 00-7237766060465fcae11538f25bfe782d-56a7d620787ac47e-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--feb82513

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

baggage routing-key=rk-e57b8776,team=alpha
traceparent 00-7237766060465fcae11538f25bfe782d-15c9e625882297d2-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--feb82513
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-f27e9daf,team=alpha
ot-baggage-routing-key rk-f27e9daf
traceparent 00-2fae461b6aa3a446b448e0ff00480dcc-e43a8114e16a2201-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--d1c3c778

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-92855bf96634dfebd36bd505e9310d61-c2a8b0898729e20c-01
user-agent Ruby
test id
otel-ruby--grpc-http--d1c3c778
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-4151221d,team=alpha
ot-baggage-routing-key rk-4151221d
traceparent 00-2917c29d32d8e9f375ab64cb613d33a1-dc09e9fdaf7994e9-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--a84a90af

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-3cae9d36c48be63da9f513f5c7e63336-0fae0527614d0451-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--a84a90af
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-1e44814e,team=alpha
ot-baggage-routing-key rk-1e44814e
traceparent 00-0ee2327007df1e72f503171a77ee7d33-cbae74d2ea3e3a76-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--138c1ca1

Observed at the sink on the outbound Kafka record headers

traceparent 00-22593ee80b3266109159fe5cd2b6ed51-700c0748c46e78a7-01
test id
otel-ruby--grpc-kafka--138c1ca1
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-7a6d8338,team=alpha
ot-baggage-routing-key rk-7a6d8338
traceparent 00-bda228bccd7811b82d9ac4d4af0150de-9078bdb405ac5b75-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--82d2dc4b

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

traceparent 00-32e6e7c85006dc359cf7e0999bc55e28-2ef2631225f33238-01
test id
otel-ruby--grpc-rabbitmq--82d2dc4b
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-08d92679,team=alpha
ot-baggage-routing-key rk-08d92679
traceparent 00-5ccc54fb22615367ec2a6b869b1ea637-8242949daa342b02-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--b1b9153c

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-08d92679,team=alpha
content-length 45
content-type application/json
traceparent 00-5ccc54fb22615367ec2a6b869b1ea637-aaf55a3d15731b09-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--b1b9153c
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-0e49b641,team=alpha
ot-baggage-routing-key rk-0e49b641
traceparent 00-70896d8b42b042f3be9749908a80bb6a-bf0e66ea94bc714c-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--f2210dff

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-0e49b641,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-70896d8b42b042f3be9749908a80bb6a-98fadba249633e4f-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--f2210dff
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-0b316a22,team=alpha
ot-baggage-routing-key rk-0b316a22
traceparent 00-762c9a71cdde62470e8633e3eea1ebab-382c0e82733969e6-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--af341876

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-0b316a22,team=alpha
traceparent 00-762c9a71cdde62470e8633e3eea1ebab-f9ccb150c182da94-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--af341876
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-502865d4,team=alpha
ot-baggage-routing-key rk-502865d4
traceparent 00-b64b51ee67c839119247611e8b909428-8c40d17b9b1b6538-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--a4505638

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

baggage routing-key=rk-502865d4,team=alpha
traceparent 00-b64b51ee67c839119247611e8b909428-81f1e7cb0080464f-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--a4505638
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-430b380d,team=alpha
ot-baggage-routing-key rk-430b380d
traceparent 00-ea3376e59ea23807a5ed43a8741a0d8a-a673dbd634144694-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--10167a8e

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-e74e508aad76cd56d93e11cba09b9d24-84250237b51c9012-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--10167a8e
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-9f534510,team=alpha
ot-baggage-routing-key rk-9f534510
traceparent 00-29e8b12a6cde751785a25c387cb8eb74-1500eeeb87393ac9-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--69a2bb0d

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-9061ba37a8dfcea17fa2d4f19486f9fa-26a9aee7216bf1e5-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--69a2bb0d
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-a7a5f140,team=alpha
ot-baggage-routing-key rk-a7a5f140
traceparent 00-16f3ebfff9398ca05d54402bfa6621dc-fc27c4722774da12-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--1c4bffe2

Observed at the sink on the outbound Kafka record headers

traceparent 00-aa4888eea916179242231f63a8e02f33-769ed178ecd5979f-01
test id
otel-ruby--rabbitmq-kafka--1c4bffe2
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-bcbb1968,team=alpha
ot-baggage-routing-key rk-bcbb1968
traceparent 00-afcf88329a28eebab00a6678519ed59d-54edef8ed3714789-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--32ec3d83

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

traceparent 00-296db2aa1e60a986e60ac5268ca57006-1676e8a10dfa0e8c-01
test id
otel-ruby--rabbitmq-rabbitmq--32ec3d83
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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