otel-go-compiletime compiletime

Go (otelc) build-time go.opentelemetry.io/otelc1.0.1

attach go tool otelc go build (source untouched)

18/64 cells pass
  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

Explanations

Go build-time weavers: Kafka consumers never hand the extracted context back to application code

open otelc's kafka-go Reader has no callback to hand back the context; Orchestrion's sarama consumer weave does not continue the trace seeded in record headers.

Both compile-time weavers break at the same place runtime agents do: the consume side of an async hop. Both compile deliberately naive apps (single main.go, zero tracing imports); only the build command differs from an uninstrumented build.

otel-go-compiletime (otelc v1.1.0): kafka-go's Reader is a pull-style API (ReadMessage(ctx) in an app-owned loop) with no callback boundary, so the woven consumer instrumentation has nowhere to hand the extracted context back to application code. The app's loop context is context.Background() and outbound calls carry nothing, not even a new trace (with no valid span context the W3C propagator injects nothing). PR #1076 confirms a consume span is created per FetchMessage; the missing half is activation, not extraction. Issue #695 (open) is the maintainer-acknowledged messaging semconv workstream naming this gap ("a process-span story for the zero-code gap") and planning IBM/sarama next. By contrast, the same variant carries baggage into Kafka with zero source changes, because kafka-go's Writer.WriteMessages(ctx, …) takes a context.

datadog-go-orchestrion (v1.13.0, dd-trace-go v2.10.1, IBM/sarama v1.60.2): the woven consumer-group instrumentation does not continue the trace seeded in the record headers, so outbound calls after a consume carry x-datadog-*/traceparent with a fresh trace-id; baggage, ot-baggage-* and the foreign tracestate entry are gone. The hand-wired datadog-go relay passes the same legs with the same library versions by following the dd-trace-go contrib README (extract-and-activate in the handler). We found no issue reporting the Orchestrion sarama consume gap.

What a user can do: extract from the record headers and set the context in the consume loop/handler yourself, the one step neither weaver can see.

12 cells affected

go-weavers-kafka-consume-no-context-activation

Go build-time weavers: no trace continues out of a RabbitMQ consume, and Orchestrion also injects nothing on publish

open Neither weaver continues a trace after a RabbitMQ consume. Orchestrion also injects nothing on publish (dd-trace-go has no amqp091 contrib); otelc 1.2.0 does inject on publish.

The relays' amqp091 code carries no tracing (the otelc relay's publish passes plain amqp.Publishing{ContentType, Body}), so whatever reaches the wire on a RabbitMQ leg was put there by the build. What the latest run measures, per variant:

datadog-go-orchestrion: nothing is injected on *->rabbitmq (the message the sink receives carries no trace headers at all) and nothing is extracted on rabbitmq->*. Where the outbound client is woven (HTTP, gRPC, Kafka) it emits a fresh Datadog root trace: traceparent scores new_trace, tracestate keeps only the dd= entry (partial), baggage is absent; on rabbitmq->rabbitmq nothing is sent. dd-trace-go has no amqp091/RabbitMQ contrib, so Orchestrion has nothing to enable on RabbitMQ legs.

otel-go-compiletime (otelc 1.2.0): publish is woven. http->rabbitmq and grpc->rabbitmq pass for traceparent, tracestate and baggage with no source change; the same legs measured as dark with otelc 1.1.0. Nothing continues a trace after a consume: on rabbitmq->* every outbound call, including a RabbitMQ publish, starts a fresh root (traceparent is new_trace, tracestate and baggage are absent). The relay's consume loop is application code that calls the forwarder with context.Background(), and the woven build does not change that.

The hand-wired otel-go and datadog-go relays pass all RabbitMQ legs with hand-written AMQP carriers.

12 cells affected

go-weavers-no-amqp-instrumentation

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

Versions measured

Tracer
go.opentelemetry.io/otelc 1.0.1 reported as v1.0.1 1.0.1 on goproxy github
Runtime
go1.26.11
Setup tier
build-time Source is untouched but the build command is wrapped by a compile-time weaver (`orchestrion go build`, `go tool otelc go build`) that injects instrumentation during compilation.
Attach
go tool otelc go build (source untouched)
Relay source
relays/go-otelc
Ran at
11 Nov 2026, 14:06 UTC
Harness
20ceb46 · measured in backtest-otel-go-compiletime-1.0.1
Raw JSON
1.0.1.json → variants[id = "otel-go-compiletime"]

Libraries

grpcgoogle.golang.org/grpc (plain source, woven)
httpnet/http (plain source, woven)
kafkasegmentio/kafka-go v0.4.51 (plain source, woven)
rabbitmqamqp091-go v1.16.0 (plain source, NO instrumentation exists)
sdkgo.opentelemetry.io/otel v1.45.0 (woven in by otelc)
weaverotelc (compile-time, no source changes)

Configuration

OTEL_PROPAGATORStracecontext,baggage
OTEL_TRACES_EXPORTERconsole

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-66eebaf5,team=alpha
ot-baggage-routing-key rk-66eebaf5
traceparent 00-c1f90e2d3d7e106abdf3eba96a277cf2-973e85b2cbcc0003-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--http-http--b467873d

Observed at the sink on the outbound HTTP request headers

accept-encoding gzip
baggage routing-key=rk-66eebaf5,team=alpha
content-length 54
content-type application/json
traceparent 00-c1f90e2d3d7e106abdf3eba96a277cf2-663d5a1c1a3cd485-01
tracestate cptest=v1
user-agent Go-http-client/1.1
test id
otel-go-compiletime--http-http--b467873d
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-64a2b387,team=alpha
ot-baggage-routing-key rk-64a2b387
traceparent 00-3fc69e336111f51f401363aba79a0416-0af10ff0a2475bab-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--http-grpc--2866eca5

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-64a2b387,team=alpha
content-type application/grpc
grpc-accept-encoding gzip
traceparent 00-3fc69e336111f51f401363aba79a0416-63c2035c21838bfa-01
tracestate cptest=v1
user-agent grpc-go/1.85.0
test id
otel-go-compiletime--http-grpc--2866eca5
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-46b15230,team=alpha
ot-baggage-routing-key rk-46b15230
traceparent 00-ce81971fd809d2cb9afe5f86e7c9228b-faf7bfb716b4655a-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--http-kafka--60c799d8

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-46b15230,team=alpha
traceparent 00-ce81971fd809d2cb9afe5f86e7c9228b-3287d7502ef062f6-01
tracestate cptest=v1
test id
otel-go-compiletime--http-kafka--60c799d8
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-69619bbc,team=alpha
ot-baggage-routing-key rk-69619bbc
traceparent 00-4b0f8163adabc27495ff85ccb950bf21-46dc076434073bd0-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--http-rabbitmq--cb716e54

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

No headers observed.

test id
otel-go-compiletime--http-rabbitmq--cb716e54
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound gRPC metadata

baggage routing-key=rk-ac1d9fc5,team=alpha
ot-baggage-routing-key rk-ac1d9fc5
traceparent 00-83a8980009fef61db8364a2d2a25530b-57dd5a01aeea7798-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--grpc-http--a0c20c45

Observed at the sink on the outbound HTTP request headers

accept-encoding gzip
baggage routing-key=rk-ac1d9fc5,team=alpha
content-length 54
content-type application/json
traceparent 00-83a8980009fef61db8364a2d2a25530b-445fc4c2169c5df7-01
tracestate cptest=v1
user-agent Go-http-client/1.1
test id
otel-go-compiletime--grpc-http--a0c20c45
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound gRPC metadata

baggage routing-key=rk-f67e8806,team=alpha
ot-baggage-routing-key rk-f67e8806
traceparent 00-2d9634ea93872424746115adc39989a6-a63d63f7f1bd0142-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--grpc-grpc--dfe3bb20

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-f67e8806,team=alpha
content-type application/grpc
grpc-accept-encoding gzip
traceparent 00-2d9634ea93872424746115adc39989a6-8505ac759417d7da-01
tracestate cptest=v1
user-agent grpc-go/1.85.0
test id
otel-go-compiletime--grpc-grpc--dfe3bb20
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound gRPC metadata

baggage routing-key=rk-5defde90,team=alpha
ot-baggage-routing-key rk-5defde90
traceparent 00-95d213a7db97fa35eac4ecdf79002b97-92b2f1a08e4762f1-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--grpc-kafka--fa9a8cc1

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-5defde90,team=alpha
traceparent 00-95d213a7db97fa35eac4ecdf79002b97-718db1e4b24e3cdc-01
tracestate cptest=v1
test id
otel-go-compiletime--grpc-kafka--fa9a8cc1
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound gRPC metadata

baggage routing-key=rk-255ad098,team=alpha
ot-baggage-routing-key rk-255ad098
traceparent 00-e9bc69570564fb066ed63f606566a34e-053b59a10b898f01-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--grpc-rabbitmq--dfe2c90b

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

No headers observed.

test id
otel-go-compiletime--grpc-rabbitmq--dfe2c90b
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-6044ff85,team=alpha
ot-baggage-routing-key rk-6044ff85
traceparent 00-4486032d2d43c1c7e26848074ab771b3-3cdac7e937abaecb-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--kafka-http--79e9434e

Observed at the sink on the outbound HTTP request headers

accept-encoding gzip
content-length 55
content-type application/json
traceparent 00-99a9f0198b8e51b4bd42e97f2c3b9ad5-96606117276380fe-01
user-agent Go-http-client/1.1
test id
otel-go-compiletime--kafka-http--79e9434e
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound Kafka record headers

baggage routing-key=rk-553f3425,team=alpha
ot-baggage-routing-key rk-553f3425
traceparent 00-b93460bf994e2fbde167d1527c323a27-77c99a2557e3d73b-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--kafka-grpc--14682b24

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
traceparent 00-6c8b56147edfbd5a432ff1c351fe98bb-877cd367a5b2e200-01
user-agent grpc-go/1.85.0
test id
otel-go-compiletime--kafka-grpc--14682b24
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound Kafka record headers

baggage routing-key=rk-37e66ba9,team=alpha
ot-baggage-routing-key rk-37e66ba9
traceparent 00-6a6e42272f9004f24a80e095cef16227-3e64c7542652ae7a-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--kafka-kafka--a420755b

Observed at the sink on the outbound Kafka record headers

traceparent 00-10de043b68a4dcb13eab85360a8c9f14-b22cc0428b755d80-01
test id
otel-go-compiletime--kafka-kafka--a420755b
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound Kafka record headers

baggage routing-key=rk-43a5ba85,team=alpha
ot-baggage-routing-key rk-43a5ba85
traceparent 00-63d5096a2ec75a8535c0b16849f504df-13c8dcb6571ec3b9-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--kafka-rabbitmq--6bbe2372

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

No headers observed.

test id
otel-go-compiletime--kafka-rabbitmq--6bbe2372
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_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-a5da3763,team=alpha
ot-baggage-routing-key rk-a5da3763
traceparent 00-36f65d8175bafb17d2e615f78d7a6c28-e40d3d64b8e07dde-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--rabbitmq-http--801c1527

Observed at the sink on the outbound HTTP request headers

accept-encoding gzip
content-length 58
content-type application/json
traceparent 00-90f6216aad672a60f476b2764895f3b4-cec46c16f9893d93-01
user-agent Go-http-client/1.1
test id
otel-go-compiletime--rabbitmq-http--801c1527
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-159338cf,team=alpha
ot-baggage-routing-key rk-159338cf
traceparent 00-ee59ec59c3facf153f9476eb8cb0cb9b-584fa9d9a826fb74-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--rabbitmq-grpc--1e027ac0

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
traceparent 00-344894dcc9d20893cfda8b6f8257c025-276a005128ef0c6e-01
user-agent grpc-go/1.85.0
test id
otel-go-compiletime--rabbitmq-grpc--1e027ac0
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-938b65b6,team=alpha
ot-baggage-routing-key rk-938b65b6
traceparent 00-ccaeef7ec362ce679f294b7205a14efb-bc988b7f9949c8fb-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--rabbitmq-kafka--c43b2cde

Observed at the sink on the outbound Kafka record headers

traceparent 00-4a6b2cc9d94a4483671599f4aafff709-7ed94d6b4c1b006b-01
test id
otel-go-compiletime--rabbitmq-kafka--c43b2cde
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-4b0166a7,team=alpha
ot-baggage-routing-key rk-4b0166a7
traceparent 00-09ae232b4e6327b545262ffcece2aef5-dfb14e72899eec11-01
tracestate cptest=v1
x-cp-canary otel-go-compiletime--rabbitmq-rabbitmq--4edf274a

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

No headers observed.

test id
otel-go-compiletime--rabbitmq-rabbitmq--4edf274a
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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