otel-ruby

Ruby init-only opentelemetry-sdk1.12.1

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.12.1 1.12.1 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:48 UTC
Harness
e793604 · measured in backtest-otel-ruby-1.12.1
Raw JSON
1.12.1.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-64d83b2b,team=alpha
ot-baggage-routing-key rk-64d83b2b
traceparent 00-d7b88960c12db78519a4bed69ed8e762-084364890182d96b-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--39d2bd74

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-64d83b2b,team=alpha
content-length 44
content-type application/json
traceparent 00-d7b88960c12db78519a4bed69ed8e762-961e848a19182a1a-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--39d2bd74
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-93e236d6,team=alpha
ot-baggage-routing-key rk-93e236d6
traceparent 00-5bebc518b6eb6ee09fcc6859e7221bdb-09e60ec6ff26ee48-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--119362e7

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-93e236d6,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-5bebc518b6eb6ee09fcc6859e7221bdb-89085424495103b1-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--119362e7
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-76f8efe8,team=alpha
ot-baggage-routing-key rk-76f8efe8
traceparent 00-005fad010d2ef7799ebd855048bd02c8-f5a710516db283fe-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--fa096595

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-76f8efe8,team=alpha
traceparent 00-005fad010d2ef7799ebd855048bd02c8-663c459b8a5ea292-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--fa096595
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-9f28a6ab,team=alpha
ot-baggage-routing-key rk-9f28a6ab
traceparent 00-32cb1c0e5d8005e5fc6e28df25055882-7965fc9aa2577538-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--4bd640e5

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

baggage routing-key=rk-9f28a6ab,team=alpha
traceparent 00-32cb1c0e5d8005e5fc6e28df25055882-c8aedc93e869e7b1-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--4bd640e5
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-9c658afe,team=alpha
ot-baggage-routing-key rk-9c658afe
traceparent 00-c8d1689ba5c3444aed0529a953f02384-4ef3b6f8e2956dc8-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--6d902cd2

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-470dddc9ad1fc3d5b2d9f725aa06b0c7-21961ab64dd87367-01
user-agent Ruby
test id
otel-ruby--grpc-http--6d902cd2
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-f5f501bd,team=alpha
ot-baggage-routing-key rk-f5f501bd
traceparent 00-4fa56c6ebb21f37ed37563b508a816c7-d59e5dcfcf493704-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--d9d484c3

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-2e08db58213ed79dc53a4eb06050a2e9-3288fd40b6d24aaf-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--d9d484c3
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-bef12c91,team=alpha
ot-baggage-routing-key rk-bef12c91
traceparent 00-aaf00d746800f9bfa6e1310f79aa2952-df9abce533e2fcf6-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--84da4d86

Observed at the sink on the outbound Kafka record headers

traceparent 00-8de9ef44f59f73f06fab6e96838391cc-0e1b42b7908c22ba-01
test id
otel-ruby--grpc-kafka--84da4d86
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-8b10177c,team=alpha
ot-baggage-routing-key rk-8b10177c
traceparent 00-b42fe03a32956a5fab44da2dcdd3d1c2-55147a82468a1e1c-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--f3367542

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

traceparent 00-554ab9dde9675fdc3ec3790bcf0d594a-930399ed271c613d-01
test id
otel-ruby--grpc-rabbitmq--f3367542
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-5dbe7656,team=alpha
ot-baggage-routing-key rk-5dbe7656
traceparent 00-c6eeb924ac912a15067320fe21cccd69-53d46faf0f9046c6-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--66fed778

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-5dbe7656,team=alpha
content-length 45
content-type application/json
traceparent 00-c6eeb924ac912a15067320fe21cccd69-19a5b110dd6b01ff-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--66fed778
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-d1c2a454,team=alpha
ot-baggage-routing-key rk-d1c2a454
traceparent 00-862b2c8ab0981aa8a4a6b148c1adf201-ee5f9f91cab488f9-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--e5939086

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-d1c2a454,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-862b2c8ab0981aa8a4a6b148c1adf201-2c9308d9a8a80ae9-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--e5939086
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-645372a4,team=alpha
ot-baggage-routing-key rk-645372a4
traceparent 00-b039d804e9be736725b18d4f18e6755b-810a77e52c5698c8-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--503fb279

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-645372a4,team=alpha
traceparent 00-b039d804e9be736725b18d4f18e6755b-678e7d8d03dfe353-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--503fb279
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-b515064b,team=alpha
ot-baggage-routing-key rk-b515064b
traceparent 00-2651c8450afd8eb64840554d7b887f4f-a45304dfa967c658-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--5aaa500f

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

baggage routing-key=rk-b515064b,team=alpha
traceparent 00-2651c8450afd8eb64840554d7b887f4f-8177d0bb88774983-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--5aaa500f
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-94ce03a0,team=alpha
ot-baggage-routing-key rk-94ce03a0
traceparent 00-1f65d8f0f8447352a4c8bf76e4baa22a-41fc8bd98af818c7-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--17094041

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-92d9eb190f1654e33e09b4c14f01a6b8-43056aeaf38889db-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--17094041
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-46084cfe,team=alpha
ot-baggage-routing-key rk-46084cfe
traceparent 00-13ae6d5bdb47ed92adda656cbeff28d1-4ea3746515dbebac-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--42a98757

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-10e8a6d8bcb37180b090d4cf626427b5-ebd0303e15838f91-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--42a98757
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-61875cf0,team=alpha
ot-baggage-routing-key rk-61875cf0
traceparent 00-4b060b59036bf4bb4fb88951bae5ce0d-fd31377516e3472b-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--652578b1

Observed at the sink on the outbound Kafka record headers

traceparent 00-1fd8275afafbef3de149f2e0462cf2d7-5571d2fdbaca8403-01
test id
otel-ruby--rabbitmq-kafka--652578b1
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-0a46fdaa,team=alpha
ot-baggage-routing-key rk-0a46fdaa
traceparent 00-a9cbac564a9a5c43c87d948ef09df3a2-e440540836be5cc2-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--1e327bf2

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

traceparent 00-2b8a2bc09988d2f7ce2f010de7ffb949-6e985186259fdc13-01
test id
otel-ruby--rabbitmq-rabbitmq--1e327bf2
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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