You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stats/opentelemetry: add e2e test for baggage propagation (#9160)
### Summary
Fixes#8520.
OpenTelemetry baggage already propagates correctly through the gRPC
pipeline when the W3C Baggage propagator is configured — the tracing
carriers (`IncomingCarrier`/`OutgoingCarrier`) are generic
`TextMapCarrier`s used by the configured propagator's
`Inject`/`Extract`, so baggage rides in the `baggage` metadata header
exactly like trace context. No production code change is needed; the gap
was the lack of a test proving it.
This PR adds `TestRPC_BaggagePropagation`, which:
- Sets baggage (`key1=value1`, `key2=value2`) on the client context.
- Configures `propagation.Baggage{}` in the trace options.
- Asserts the **server handler** observes the same baggage, for both a
unary and a streaming RPC.
### Verification
- Passes with `-race`.
- Confirmed meaningful: removing `propagation.Baggage{}` makes the test
fail (server sees empty baggage), so it exercises propagation rather
than passing vacuously.
- `go vet` and `gofmt` clean.
RELEASE NOTES: none
0 commit comments