Git Product home page Git Product logo

Comments (1)

nicmunroe avatar nicmunroe commented on August 13, 2024

Hey @bijukunjummen , sorry for the very late response on this.

It's become increasingly clear that we cannot rely on WebClient threading behaviors being consistent, especially between versions of Spring - even supposedly non-breaking version updates of Spring. You can see I just had to drop support for some of the minimal auto-magic tracing propagation wingtips was already attempting to do, due to a breaking change with how spring handles their threading: see this comment in the javadocs.

☝️ is important for your example as well, given that your example does not use webClient.attribute(TracingState.class.getName(), TracingState.getCurrentThreadTracingState()) to propagate the tracing state. Please read the linked javadoc comment carefully, and start using the webClient.attribute(...) mechanism to do the initial tracing state propagation, otherwise you'll upgrade spring someday and all your WebClient calls will fail to do distributed tracing correctly!

There may be some very complex way to auto-magic the tracing state onto threads as WebClient hops from thread to thread, but the effort required would undoubtedly be very large and I'd be skeptical about its fragility.

My recommendation on your specific question around map and flatMap would be to use the wingtips-java8 features (see examples here) to wrap your map and flatMap functions to ensure the proper tracing state is attached when those functions execute. Same idea as what we're dong here in the SB2 webflux sample app.

from wingtips.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.