SIGN IN SIGN UP

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
U
ulas committed
378072a6752dd546416938b0878266c78d10cc03
Parent: 0e45140
Committed by GitHub <noreply@github.com> on 7/31/2026, 5:32:30 PM