Git Product home page Git Product logo

Comments (1)

nicmunroe avatar nicmunroe commented on August 13, 2024

@netwolfuk If a *withTracing() function is executed, it will call the wrapped runnable's run method. The fact that your WebClient is instantiated is proof of that.

Side note: WebClient doesn't have a run() method. So I'm not sure exactly what you're expecting to work that's not working. Therefore I may be misunderstanding your question. If you were able to create a minimal code example or unit test to show the issue that might make it easier.

What may be happening is you're not explicitly passing in the tracing state you want the withTracing() to use, so it's picking up whatever's on the thread when the wrapper runnable is created (i.e. whatever the tracing state is when executorService.execute(...) is called, NOT when the executor actually executes the runnable which may happen later on a different thread). So if the current thread's tracing state isn't correct when executorService.execute(withTracing(...)) is called, then there's no way for the WebClient to pick it up.

Also note that Spring changed their WebClient threading behavior in more recent versions, so WingtipsSpringWebfluxExchangeFilterFunction can no longer pick up the tracing state automatically, even if you explicitly passed the tracing state to withTracing(). In order for wingtips to receive the tracing state reliably you must use webClient.attribute(TracingState.class.getName(), tracingStateForWebClientCall). This issue is now described in this javadoc here. As far as I can tell there's no way around this - Spring changed their threading behavior. This may also be what's going on with your code.

Hopefully that helps? I'm going to close this issue, but if you're still not able to get stuff working then feel free to reopen.

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.