Describe the bug The observations that Spring Security provides are not being properly nested with their parent span when running in Webflux mode. This does not affect servlet.

To Reproduce 1. Run any spring boot application with webflux and spring security to your tracing backend of choice (in my example, Tempo) 2. Make any HTTP call 3. Notice the trace spans are not properly nested

WEBFLUX Spring Security Observation Spans are not nested correctly in Webflux

Expected behavior The spans should be nested as they are in Servlet mode. This becomes hard to read in very large or complicated filter chains across multiple services

SERVLET Spring Security Observation Spans are not nested correctly in Webflux

Sample

There is no need for sample code as your project literally does not need to have any code in it aside from start.spring.io dependencies I listed.

Comment From: jzheaux

Thanks, @braunsonm, for the report. I've scheduled it for our next maintenance release.