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
23 Nov 2026, 13:42 UTC
Harness
089dcbd · run run-2026-11-23.3
Raw JSON
run-2026-11-23.3.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.1 (puma 8.1.2) + opentelemetry-instrumentation-sinatra 0.30.1 + opentelemetry-instrumentation-rack 0.31.2
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-b3e9137a,team=alpha
ot-baggage-routing-key rk-b3e9137a
traceparent 00-5b7d34b71d339ba8170c136729d97a74-8db0164d9af4b17e-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--442689c4

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-b3e9137a,team=alpha
content-length 44
content-type application/json
traceparent 00-5b7d34b71d339ba8170c136729d97a74-8b986ec7645666fe-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--442689c4
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-8ce31214,team=alpha
ot-baggage-routing-key rk-8ce31214
traceparent 00-b2853bd09dec1d36c5b0169db87ca6b1-6a47b0ad9854d0d5-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--9895a642

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-8ce31214,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-b2853bd09dec1d36c5b0169db87ca6b1-a6434a5182ae124e-01
tracestate cptest=v1
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--9895a642
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-914048ef,team=alpha
ot-baggage-routing-key rk-914048ef
traceparent 00-29b105617c2ab8588a0a0d2074dce8c2-cd7aef959ca3f6ac-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--c2f0b144

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-914048ef,team=alpha
traceparent 00-29b105617c2ab8588a0a0d2074dce8c2-c01e39a603ac1d9e-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--c2f0b144
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-68e1981a,team=alpha
ot-baggage-routing-key rk-68e1981a
traceparent 00-65b49a5af4c26d85cddf43466e95184c-9279a769d929e3ec-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--9180a852

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

baggage routing-key=rk-68e1981a,team=alpha
traceparent 00-65b49a5af4c26d85cddf43466e95184c-ddf917c9e87d97b7-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--9180a852
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-b1bff372,team=alpha
ot-baggage-routing-key rk-b1bff372
traceparent 00-428d0399c52c0e4da79c4b02af6124ba-e00c2d6e5774b9f3-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--d4cf3eca

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-f93b1af6e319608b17fce32465321dab-21ce3a3eef118c28-01
user-agent Ruby
test id
otel-ruby--grpc-http--d4cf3eca
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-96bb1e88,team=alpha
ot-baggage-routing-key rk-96bb1e88
traceparent 00-29807e5a392a93ab474746bd4001b9cc-c14840f108ae45fb-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--fc59ca90

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-eb287617c58575925acecd77a5655bc1-80020a3699971ee7-01
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--fc59ca90
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-b768036f,team=alpha
ot-baggage-routing-key rk-b768036f
traceparent 00-9b28ed504632bce8b52bc30abd807ed0-fa24dc8010f784a5-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--a245099e

Observed at the sink on the outbound Kafka record headers

traceparent 00-07fb49c8019b26e72427ae7deb167d42-b4442c15c3444e1b-01
test id
otel-ruby--grpc-kafka--a245099e
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-1181b431,team=alpha
ot-baggage-routing-key rk-1181b431
traceparent 00-e4bb1144602f20b4ed17b2e598d3e333-65c4dbbc3cacf210-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--5db88e2a

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

traceparent 00-d89c610e0549625ebabe3687984b3071-aecbc8e72e10826c-01
test id
otel-ruby--grpc-rabbitmq--5db88e2a
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-95fac655,team=alpha
ot-baggage-routing-key rk-95fac655
traceparent 00-043209ef32fc80b25bffe2eaeb261a63-7d9ca952a7376ae7-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--66c48be1

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-95fac655,team=alpha
content-length 45
content-type application/json
traceparent 00-043209ef32fc80b25bffe2eaeb261a63-261c145338b533ab-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--66c48be1
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-0d33a4df,team=alpha
ot-baggage-routing-key rk-0d33a4df
traceparent 00-3bf4379894772b2e906bdb58870b5616-b93b3cc67050b1eb-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--cde8a77c

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-0d33a4df,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-3bf4379894772b2e906bdb58870b5616-c712b610275c8b42-01
tracestate cptest=v1
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--cde8a77c
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-62bbdb52,team=alpha
ot-baggage-routing-key rk-62bbdb52
traceparent 00-a3549955abcbfe1077173435edaafab1-f3a093345884b385-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--51ac223a

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-62bbdb52,team=alpha
traceparent 00-a3549955abcbfe1077173435edaafab1-848a15fc4db85e09-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--51ac223a
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-402e0c4b,team=alpha
ot-baggage-routing-key rk-402e0c4b
traceparent 00-f51bb8e673f865dce19cbaf19885a606-9ab67b17a9f125c2-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--01e3d591

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

baggage routing-key=rk-402e0c4b,team=alpha
traceparent 00-f51bb8e673f865dce19cbaf19885a606-ebc586d51eac7920-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--01e3d591
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-b09606bf,team=alpha
ot-baggage-routing-key rk-b09606bf
traceparent 00-554b914c3b1b9864ea41b47b023dee7c-61367488e809b7f3-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--50e38f6c

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-25b2e9a2dfc92ac704e8e6b60946e74f-ab7d65ea7a82b15a-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--50e38f6c
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-1fd3caa2,team=alpha
ot-baggage-routing-key rk-1fd3caa2
traceparent 00-c4270641d1e64ff38e2a0fd9072a87e7-ef2ae1c61d9b9e78-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--b1e549c3

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-5dc84187b0d58f4f1a8f2322c280a16d-0dcb0a33634e26b8-01
user-agent grpc-ruby/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--b1e549c3
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-cf3c83ce,team=alpha
ot-baggage-routing-key rk-cf3c83ce
traceparent 00-33e198d1fc499186f38381f29037d1cf-7340794da2bf0891-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--d6f30b49

Observed at the sink on the outbound Kafka record headers

traceparent 00-af00f928bde766fca9d186c7a45bbbc7-bb7981fa391d05b0-01
test id
otel-ruby--rabbitmq-kafka--d6f30b49
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-2234f914,team=alpha
ot-baggage-routing-key rk-2234f914
traceparent 00-cc735af7863a45b20af00afc71d4ba41-7d9a79f94c786d96-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--5bacfd5d

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

traceparent 00-e22cb27fbbfed23d657037ea6258dadd-cc478b6e5d01c5d5-01
test id
otel-ruby--rabbitmq-rabbitmq--5bacfd5d
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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