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
{{ message }}
Repository navigation
The non-volatile wrapped flag is toggled in apply() on wrappers that are cached and shared between threads. #1517
The non-volatile wrapped flag is toggled in apply() on wrappers that are cached and shared between threads. A concurrent call can skip the around-advice, which is where observability hooks run.
We're hitting this on Spring Cloud Function 5.0.5 (Spring Cloud 2025.1.4, Spring Boot 4.1.2) with Spring Cloud Stream and the GCP Pub/Sub binder (Spring Cloud GCP 8.3.1), using Micrometer Tracing with the Brave bridge and Hooks.enableAutomaticContextPropagation().
Impact: the binder delivers on several subscriber threads, so concurrent messages regularly see wrapped == true and skip ObservationFunctionAroundWrapper. Those invocations get no <definition> process observation. The consumer runs only under the binder's Brave on-message span, which is not a Micrometer Observation, so block() captures no observation into the Reactor Context. Any client call made after a thread hop then starts a new trace instead of joining the message's trace. That covers WebClient after an RSocket response, RSocket, and Lettuce reactive commands, since Lettuce's MicrometerTracing reads the parent only from the Reactor Context.
In one sampling window:
Service A: 27 of 49 traced messages had no process span, and their downstream HTTP calls showed up as separate root traces.
Service B: 17 of 60 traced messages had no process span, and every Redis command in them became a root trace.
Workaround until #1521 is released: decorate each consumer so it opens an observation only when none is current. When SCF's own process observation is present, this adds nothing.
Activity
nrheckman-afero commentedon Nov 19, 2026
We're hitting this on Spring Cloud Function 5.0.5 (Spring Cloud 2025.1.4, Spring Boot 4.1.2) with Spring Cloud Stream and the GCP Pub/Sub binder (Spring Cloud GCP 8.3.1), using Micrometer Tracing with the Brave bridge and
Hooks.enableAutomaticContextPropagation().Impact: the binder delivers on several subscriber threads, so concurrent messages regularly see
wrapped == trueand skipObservationFunctionAroundWrapper. Those invocations get no<definition> processobservation. The consumer runs only under the binder's Braveon-messagespan, which is not a MicrometerObservation, soblock()captures no observation into the Reactor Context. Any client call made after a thread hop then starts a new trace instead of joining the message's trace. That covers WebClient after an RSocket response, RSocket, and Lettuce reactive commands, since Lettuce'sMicrometerTracingreads the parent only from the Reactor Context.In one sampling window:
processspan, and their downstream HTTP calls showed up as separate root traces.processspan, and every Redis command in them became a root trace.Workaround until #1521 is released: decorate each consumer so it opens an observation only when none is current. When SCF's own
processobservation is present, this adds nothing.With this in place, the root client traces went to zero, and the fallback fires for the concurrent messages SCF skips.
GH-1517: Isolate around-wrapper reentrancy state per thread
spring-cloudGH-1517: Isolate around-wrapper reentrancy state per thread