Part of #31 (mirrors equinix-labs/otel-cli#390). Follow-up to the envcar TRACEPARENT adoption — same plumbing.
Today otel-cli handles only TRACEPARENT; TRACESTATE is hardcoded to "" (otlpclient/protobuf_span.go) and BAGGAGE is absent. exec only strips/re-adds TRACEPARENT= from the child env.
Scope (passthrough)
- Extend the composite propagator to
propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}).
- Carry tracestate through extract -> inject so child processes receive it (TraceContext propagator already round-trips tracestate via the SpanContext).
- Carry baggage through extract -> inject via the Baggage propagator +
envcar.Carrier.
- In
exec.go, stop special-casing only TRACEPARENT — let the carrier own which keys it writes so we don't double-emit or drop TRACESTATE/BAGGAGE.
Explicitly out of scope (decided)
- Recording baggage as span attributes.
- Setting tracestate on otel-cli's own emitted spans.
(Propagation passthrough only; can be revisited in a separate issue if wanted.)
Tests
- Functional roundtrip for
TRACESTATE through otel-cli exec.
- Functional roundtrip for
BAGGAGE through otel-cli exec.
- Key-normalization behavior per the env-carriers spec.
Part of #31 (mirrors equinix-labs/otel-cli#390). Follow-up to the envcar TRACEPARENT adoption — same plumbing.
Today otel-cli handles only TRACEPARENT; TRACESTATE is hardcoded to
""(otlpclient/protobuf_span.go) and BAGGAGE is absent.execonly strips/re-addsTRACEPARENT=from the child env.Scope (passthrough)
propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}).envcar.Carrier.exec.go, stop special-casing onlyTRACEPARENT— let the carrier own which keys it writes so we don't double-emit or drop TRACESTATE/BAGGAGE.Explicitly out of scope (decided)
(Propagation passthrough only; can be revisited in a separate issue if wanted.)
Tests
TRACESTATEthroughotel-cli exec.BAGGAGEthroughotel-cli exec.