Summary
dd-trace-java does not inject the W3C baggage header on outgoing HTTP requests made via Spring WebClient (Reactor Netty transport). Trace headers (traceparent, x-datadog-*) are injected correctly, but baggage is consistently missing.
Environment
- dd-java-agent: 1.62.0
- Java: 17 and 25 (Amazon Corretto) — tested both, same result
- Spring Boot: 3.4.13 and 3.5.14 — tested both, same result
- Reactor Netty: 1.2.6 and 1.2.17 — tested both, same result
Configuration
DD_TRACE_PROPAGATION_STYLE=tracecontext,baggage,datadog
DD_TRACE_INTEGRATION_REACTOR_HOOKS_ENABLED=true
OTEL_PROPAGATORS=tracecontext,baggage
Also tried via JVM properties:
-Ddd.trace.propagation.style.extract=tracecontext,baggage,datadog
-Ddd.trace.propagation.style.inject=tracecontext,baggage,datadog
-Ddd.trace.integration.reactor-hooks.enabled=true
Reproduction
Minimal Spring Boot app with a single endpoint that receives a baggage header and proxies via WebClient:
@GetMapping("/proxy-netty")
public String proxyNetty() {
return WebClient.builder().build()
.get()
.uri("http://localhost:9090/downstream")
.retrieve()
.bodyToMono(String.class)
.block();
}
Steps:
- Start an echo server on port 9090 (prints received headers)
- Start the app with dd-java-agent attached
- Send:
curl -H "baggage: userId=12345,sessionId=abc" http://localhost:8080/proxy-netty
- Observe echo server output
Expected: Echo server receives baggage: userId=12345,sessionId=abc
Actual: Echo server receives traceparent and x-datadog-* headers but no baggage
Notes
- The same baggage header IS propagated correctly when using
RestClient with JdkClientHttpRequestFactory or raw java.net.http.HttpClient.
- This suggests the issue is specific to the Reactor Netty instrumentation path.
Summary
dd-trace-java does not inject the W3C
baggageheader on outgoing HTTP requests made via SpringWebClient(Reactor Netty transport). Trace headers (traceparent,x-datadog-*) are injected correctly, butbaggageis consistently missing.Environment
Configuration
Also tried via JVM properties:
Reproduction
Minimal Spring Boot app with a single endpoint that receives a
baggageheader and proxies viaWebClient:Steps:
curl -H "baggage: userId=12345,sessionId=abc" http://localhost:8080/proxy-nettyExpected: Echo server receives
baggage: userId=12345,sessionId=abcActual: Echo server receives
traceparentandx-datadog-*headers but nobaggageNotes
RestClientwithJdkClientHttpRequestFactoryor rawjava.net.http.HttpClient.