otel-ruby

Ruby init-only opentelemetry-sdk1.7.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.7.0 1.7.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
9 Nov 2026, 19:43 UTC
Harness
9b99070 · measured in backtest-otel-ruby-1.7.0
Raw JSON
1.7.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-60538674,team=alpha
ot-baggage-routing-key rk-60538674
traceparent 00-4a3197bcf2b6ccb70fe9387e293e246e-378f527cefaa3b2a-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--41a6de3e

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-60538674,team=alpha
content-length 44
content-type application/json
traceparent 00-4a3197bcf2b6ccb70fe9387e293e246e-95def43ef7517e57-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--41a6de3e
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-a0dd7f27,team=alpha
ot-baggage-routing-key rk-a0dd7f27
traceparent 00-36e18179db0e5e3fff1ab70cea14afcf-0e4a5b6d1c1975f1-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--d66cf735

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-a0dd7f27,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-36e18179db0e5e3fff1ab70cea14afcf-7175761d541260b5-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--d66cf735
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-1cf88361,team=alpha
ot-baggage-routing-key rk-1cf88361
traceparent 00-d282329c177e821cc1394d77655c3fdf-2461b329692ea7c6-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--073cfacd

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-1cf88361,team=alpha
traceparent 00-d282329c177e821cc1394d77655c3fdf-a3c8aa2a920b1526-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--073cfacd
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-9f145827,team=alpha
ot-baggage-routing-key rk-9f145827
traceparent 00-1b2907c0dbdf90a2a94c4a142e895100-9bc609f28103f363-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--ac71fe53

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

baggage routing-key=rk-9f145827,team=alpha
traceparent 00-1b2907c0dbdf90a2a94c4a142e895100-e716372ca4b2fc3f-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--ac71fe53
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-441b113e,team=alpha
ot-baggage-routing-key rk-441b113e
traceparent 00-6e18dc3d1b7b78d307cfdd991d4d004f-f91f12ca51908cf2-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--d82d6fd7

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-58e9f126b57664383b3767696b00bb4d-c65716c4193d125f-01
user-agent Ruby
test id
otel-ruby--grpc-http--d82d6fd7
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-7e1ba957,team=alpha
ot-baggage-routing-key rk-7e1ba957
traceparent 00-697827b920cedf4235a8d082902e55cb-ea6c2cef517401e9-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--76a6f48f

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-002bf7e4c0ef11d9f4eb264065fbe029-27aa4984e91a067e-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--76a6f48f
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-cbe25d46,team=alpha
ot-baggage-routing-key rk-cbe25d46
traceparent 00-881b520cad0a9dfe64af655a8c142dc1-3874206faaef68b2-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--2674e108

Observed at the sink on the outbound Kafka record headers

traceparent 00-20c85c549b81ef2ea24896a0aad6c278-93550cac585e138d-01
test id
otel-ruby--grpc-kafka--2674e108
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-c4a5b7ba,team=alpha
ot-baggage-routing-key rk-c4a5b7ba
traceparent 00-28e3cc776a082597dd6ff4e538d0fa0e-372b9b30ed99805f-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--3fdbfca9

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

traceparent 00-8ef29a994dc58b9a251b84124d53bd1a-a01c3e221c98b7e5-01
test id
otel-ruby--grpc-rabbitmq--3fdbfca9
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-e5095f92,team=alpha
ot-baggage-routing-key rk-e5095f92
traceparent 00-640d51f5d3145810350173244f0511d2-ff200a48b3232f9c-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--85adc03a

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-e5095f92,team=alpha
content-length 45
content-type application/json
traceparent 00-640d51f5d3145810350173244f0511d2-737700ad14b31be4-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--85adc03a
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-27778e85,team=alpha
ot-baggage-routing-key rk-27778e85
traceparent 00-4fd443f1ce75b2ba5e76a294ff72c572-5ce9c8fa129c2bbc-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--32b77b24

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-27778e85,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-4fd443f1ce75b2ba5e76a294ff72c572-0882b66b4c89f915-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--32b77b24
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-9b1c429a,team=alpha
ot-baggage-routing-key rk-9b1c429a
traceparent 00-b93d9d71742e9596e5c872430bb7a153-389f35d6d14d4e09-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--f673edd0

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-9b1c429a,team=alpha
traceparent 00-b93d9d71742e9596e5c872430bb7a153-1c5aea7acda40842-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--f673edd0
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-e6bd574f,team=alpha
ot-baggage-routing-key rk-e6bd574f
traceparent 00-7d45eced8da999a8375076fec0a7c53d-666f10c6197af4f1-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--432b7cb2

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

baggage routing-key=rk-e6bd574f,team=alpha
traceparent 00-7d45eced8da999a8375076fec0a7c53d-2e37f05682dd7212-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--432b7cb2
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-f3aebdd7,team=alpha
ot-baggage-routing-key rk-f3aebdd7
traceparent 00-ac700fcd3141834a91932af89779adc7-820e151152a84310-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--82b48513

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-798a7247ceee0cf961a175bad94c7783-da54a2823be8539c-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--82b48513
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-f6d3583b,team=alpha
ot-baggage-routing-key rk-f6d3583b
traceparent 00-76cb13828fbb31d3016701958cbb1617-2224c3264892736b-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--b7b35a1a

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-4d20bd00477d3307e99ebb4b6b9d6b10-a895879b584a2ff2-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--b7b35a1a
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-f1333d62,team=alpha
ot-baggage-routing-key rk-f1333d62
traceparent 00-0e0c6c083925209ac6b8ee967371878f-92f863e951956346-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--8f6055c0

Observed at the sink on the outbound Kafka record headers

traceparent 00-69e783a1e24a54bc73c96d001f9e6825-ad483e63a713da65-01
test id
otel-ruby--rabbitmq-kafka--8f6055c0
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-9c35d39a,team=alpha
ot-baggage-routing-key rk-9c35d39a
traceparent 00-46c58e98a89fa9472dea5304444ca658-666560548335e76b-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--7cc3f5a3

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

traceparent 00-9d27c3678e5ed3f1d5566f9e10e8ff09-e4f7b6526f91ada3-01
test id
otel-ruby--rabbitmq-rabbitmq--7cc3f5a3
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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