otel-ruby

Ruby init-only opentelemetry-sdk1.4.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.4.0 1.4.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:57 UTC
Harness
9b99070 · measured in backtest-otel-ruby-1.4.0
Raw JSON
1.4.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-d9e5f355,team=alpha
ot-baggage-routing-key rk-d9e5f355
traceparent 00-b0f7ba3f8858fc9c4142666a6e40390b-865b922969fead08-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-http--bdaf53e8

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-d9e5f355,team=alpha
content-length 44
content-type application/json
traceparent 00-b0f7ba3f8858fc9c4142666a6e40390b-8316c528d5d05beb-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--http-http--bdaf53e8
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-7747037a,team=alpha
ot-baggage-routing-key rk-7747037a
traceparent 00-64780eefe8984838adddbe02f1b59f55-a2cefe46542b031d-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-grpc--81cda674

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-7747037a,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-64780eefe8984838adddbe02f1b59f55-52e32efc20000305-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--http-grpc--81cda674
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-d667f3c4,team=alpha
ot-baggage-routing-key rk-d667f3c4
traceparent 00-2be060135dbc59a82c37e170bd4dbc3f-7fec32523864c5c7-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-kafka--77da6cda

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-d667f3c4,team=alpha
traceparent 00-2be060135dbc59a82c37e170bd4dbc3f-87d8c8535089549d-01
tracestate cptest=v1
test id
otel-ruby--http-kafka--77da6cda
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-557acbf8,team=alpha
ot-baggage-routing-key rk-557acbf8
traceparent 00-142042b5b3ba3aa86896eae67be3dd9a-75feda964742066c-01
tracestate cptest=v1
x-cp-canary otel-ruby--http-rabbitmq--f09f71c4

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

baggage routing-key=rk-557acbf8,team=alpha
traceparent 00-142042b5b3ba3aa86896eae67be3dd9a-24fbb3f408c6d444-01
tracestate cptest=v1
test id
otel-ruby--http-rabbitmq--f09f71c4
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-327a858e,team=alpha
ot-baggage-routing-key rk-327a858e
traceparent 00-05a3413519c497a62964291efd925575-c5a7d73f9027d713-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-http--2d404a24

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-d413c3892467e0a6ac2d46338c775965-07b022c75bd2b88d-01
user-agent Ruby
test id
otel-ruby--grpc-http--2d404a24
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-145a7e02,team=alpha
ot-baggage-routing-key rk-145a7e02
traceparent 00-946c60419fa9d2b7ef744eb22ef2b764-e0535b6b4b061c67-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-grpc--ed95c10a

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-cbb6fe86fbf4ccc0791a57680fcbfdde-872a5666784e7be9-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--grpc-grpc--ed95c10a
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-d56a08d8,team=alpha
ot-baggage-routing-key rk-d56a08d8
traceparent 00-c343a3dd9fa77f390017be5d2d84b3a8-2246f3af0d8ea0d7-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-kafka--52410abf

Observed at the sink on the outbound Kafka record headers

traceparent 00-1516966d6a9e70ffdf6ba631613ae75f-697e0199097ea65a-01
test id
otel-ruby--grpc-kafka--52410abf
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-a5667ab2,team=alpha
ot-baggage-routing-key rk-a5667ab2
traceparent 00-0fb855376ff8045d5959b31f96247a32-8626809e1779614f-01
tracestate cptest=v1
x-cp-canary otel-ruby--grpc-rabbitmq--6d6e5980

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

traceparent 00-4125022f428697852c33596069f744a7-0990046a0f064474-01
test id
otel-ruby--grpc-rabbitmq--6d6e5980
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-c6842563,team=alpha
ot-baggage-routing-key rk-c6842563
traceparent 00-106062ead6d4bccea2b40a1e9cb8fd43-de83cf15bf211721-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-http--fdf70264

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-c6842563,team=alpha
content-length 45
content-type application/json
traceparent 00-106062ead6d4bccea2b40a1e9cb8fd43-0d9297f2d635f434-01
tracestate cptest=v1
user-agent Ruby
test id
otel-ruby--kafka-http--fdf70264
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-d938a838,team=alpha
ot-baggage-routing-key rk-d938a838
traceparent 00-74f0b0481698d8e3b3768ffc5bf785e2-59a43512abde040f-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-grpc--b8a45323

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-d938a838,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-74f0b0481698d8e3b3768ffc5bf785e2-e877c82aec7fd4ee-01
tracestate cptest=v1
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--kafka-grpc--b8a45323
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-8c96b381,team=alpha
ot-baggage-routing-key rk-8c96b381
traceparent 00-519c2370f3b7ecda9d42caca1f70868c-f8c52739962e53fa-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-kafka--b6ba0240

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-8c96b381,team=alpha
traceparent 00-519c2370f3b7ecda9d42caca1f70868c-932b0f48d41014cc-01
tracestate cptest=v1
test id
otel-ruby--kafka-kafka--b6ba0240
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-fe1ed338,team=alpha
ot-baggage-routing-key rk-fe1ed338
traceparent 00-89e816e10b13f01d1f7ee68b11070b68-0b6a45aad73f8eca-01
tracestate cptest=v1
x-cp-canary otel-ruby--kafka-rabbitmq--69be30f1

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

baggage routing-key=rk-fe1ed338,team=alpha
traceparent 00-89e816e10b13f01d1f7ee68b11070b68-58b9aaab3ae052d7-01
tracestate cptest=v1
test id
otel-ruby--kafka-rabbitmq--69be30f1
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-16adacb7,team=alpha
ot-baggage-routing-key rk-16adacb7
traceparent 00-c5c1238058786ee0d3053c50f67720c3-e46ab4a86283054e-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-http--63c71ec2

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-da8cbdb61cb24edac069a633752c69d4-2cda53dcb0c455ba-01
user-agent Ruby
test id
otel-ruby--rabbitmq-http--63c71ec2
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-d8805dd9,team=alpha
ot-baggage-routing-key rk-d8805dd9
traceparent 00-50aab4907315069f5623b425252f900b-8040193c2f150c50-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-grpc--e72286a5

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-750e19c8b5165d075d84167d954fafcf-d82f1ef5527cf3de-01
user-agent grpc-ruby/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-ruby--rabbitmq-grpc--e72286a5
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-71bd6b88,team=alpha
ot-baggage-routing-key rk-71bd6b88
traceparent 00-939a8cde69986f6f624183b6f809fb23-0fd5639f15be858f-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-kafka--a18f3bdf

Observed at the sink on the outbound Kafka record headers

traceparent 00-00111789d49f86e820c02c00e0b26339-305049f730dfb67f-01
test id
otel-ruby--rabbitmq-kafka--a18f3bdf
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-36e5ca6c,team=alpha
ot-baggage-routing-key rk-36e5ca6c
traceparent 00-9d543e666da0e7c38c1c3e364634a595-60befb3de8914de2-01
tracestate cptest=v1
x-cp-canary otel-ruby--rabbitmq-rabbitmq--969483c4

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

traceparent 00-e1882965e937a7897cdcca23689479a8-958f9ed271570ca8-01
test id
otel-ruby--rabbitmq-rabbitmq--969483c4
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent

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